Data Type Problem!!!
I am having trouble with a data type ...that is what I suspect.
I am trying to make a macro with a loop for running a Autofilter where in
the macro selects the filtes as 1:01,1:02,1:03....1:40.
I am able to make a loop and run it properly but the problem is that macro
does not work for values 1:01,1:02...1:09 after that it works fine. The
command I am using is:
Dim xsect As Integer
Dim ysect As Integer
..
..(This area has the loop which is working fine)
..
Selection.AutoFilter Field:=6, Criteria1:=xsect & ":" & ysect
Now the problem is the macro runs a search for 1:1 and not 1:01 is there any
way I can make ysect increase by 1 and show i t up as 2 digits for a single
digit as well. If not then what should I do?
|