In Sheet1 run code it will produce sheet Series and work as per my need
Now if you copy and paste code vertohori() exists in sheet1 to series sheet and run it
It will also run and there will be no error
Now issue is
In this state if you run again sheet1 code it will produce error (Previously it wasn't producing error)
Which I dig out is below line in vertohori() code (i modify this code and add some line in it)
If you comment it then codes work well if you delete series sheet and do above all
Code: Select all
xxx.Range("g1").Resize(Application.Max(Columns(V_V)) + 1, col).Sort Key1:=Range("g1"), Order1:=xlDescending, _
Orientation:=xlLeftToRight
i tried lot to resolve now i give up.
some more finding are
if you delete Series sheet and do F8 below line will not sort anything in series sheet
Code: Select all
wsh2.Range("A2:N" & n).Sort Key1:=wsh2.Range("A2"), Header:=xlNo
Note: Both Codes I am running from Ribbon some other file
Adeel