L
Ludo
Hi all,
I'm trying to sort a column (column T) in a hidden page (Add In
property = True).
I found some code on the net, but i always get a Error 9 message
(Subscript out of range (Error 9).
When i set the IsAddin property to False, everything's right, but as
soon as i set it back to True, i'll get the error message.
What am i doing wrong?
Using win XP & Excel2003 SP3.
here's the code i use:
'sort
With ThisWorkbook.Sheets("common settings").Range("T1" )
.Cells.Sort Key1:=Sheets("common settings").Range("T1"),
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortTextAsNumbers
End With
following 'version' of the code generates the same error:
'sort
With ThisWorkbook.Sheets("Common Settings").Range("T:T")
.Cells.Sort Key1:=Sheets("Common Settings").Range("T:T"),
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortTextAsNumbers
End With
Any help welcome.
Regards,
Ludo
I'm trying to sort a column (column T) in a hidden page (Add In
property = True).
I found some code on the net, but i always get a Error 9 message
(Subscript out of range (Error 9).
When i set the IsAddin property to False, everything's right, but as
soon as i set it back to True, i'll get the error message.
What am i doing wrong?
Using win XP & Excel2003 SP3.
here's the code i use:
'sort
With ThisWorkbook.Sheets("common settings").Range("T1" )
.Cells.Sort Key1:=Sheets("common settings").Range("T1"),
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortTextAsNumbers
End With
following 'version' of the code generates the same error:
'sort
With ThisWorkbook.Sheets("Common Settings").Range("T:T")
.Cells.Sort Key1:=Sheets("Common Settings").Range("T:T"),
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortTextAsNumbers
End With
Any help welcome.
Regards,
Ludo