Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type Mismatch Error in Excel VB on RowIndex
I get an error on the last line of the below snipit
Type Mismatch. I'm doing a for loop and want to use the variables StartRow and Endrow Any help would be greatly appreciated. Thanks in Advance -------- Dim StartRow As Integer Dim EndRow As Integer StartRow = 1 EndRow = StartRow + 3 Sheets("Master").Select Rows("1:4").Select 'STATIC version of what I want Rows("StartRow:EndRow").Select ' Dynamic vers of it *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type Mismatch Error in Excel VB on RowIndex
Try this
Rows(StartRow & ":" & EndRow).Select ' Dynamic vers of it Because the variables where in quotes they were inyerpreted as text Mike "Rob Fenwick" wrote: I get an error on the last line of the below snipit Type Mismatch. I'm doing a for loop and want to use the variables StartRow and Endrow Any help would be greatly appreciated. Thanks in Advance -------- Dim StartRow As Integer Dim EndRow As Integer StartRow = 1 EndRow = StartRow + 3 Sheets("Master").Select Rows("1:4").Select 'STATIC version of what I want Rows("StartRow:EndRow").Select ' Dynamic vers of it *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Conditional Formatting - Run Time Error '13' Type Mismatch Error | Excel Programming | |||
run time error(13) type mismatch in Excel Feed | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |