Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ooops: Typo!
Selection.AutoFilter Field:=6, Criteria1:= xsect & ":" & format(ysect,"00") "Addy" a écrit dans le message de news: ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Type Problem? | Excel Discussion (Misc queries) | |||
Type Mismatch Problem | Excel Programming | |||
Type mismatch problem? | Excel Programming | |||
Data type problem - ODBC Excel '97-2000 Driver | Excel Programming | |||
Excel VBA - Data Type Conversion problem | Excel Programming |