Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dumb Dim Question
I have what is probably a simple dim question....
I have set a variable.... Dim MyVar MyVar = Range("AG1").Text Now I want to select a range of rows from the 2nd row to the row# that is my variable. (EX.(If MyVar is 10, then I want to select rows 2 thru 10) I tried.. Rows("2:MyVar").Select and it obviously failed with a type mismatch. Thanks in advance! -Mike *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dumb Dim Question
Michael,
Try Rows("2:" & MyVar).Select -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Michael Smith" wrote in message ... I have what is probably a simple dim question.... I have set a variable.... Dim MyVar MyVar = Range("AG1").Text Now I want to select a range of rows from the 2nd row to the row# that is my variable. (EX.(If MyVar is 10, then I want to select rows 2 thru 10) I tried.. Rows("2:MyVar").Select and it obviously failed with a type mismatch. Thanks in advance! -Mike *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dumb Question | Excel Worksheet Functions | |||
dumb question | Excel Worksheet Functions | |||
Very dumb question | Excel Discussion (Misc queries) | |||
No Dumb Question | Excel Worksheet Functions | |||
dumb question | Excel Programming |