Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the VBA code listed below.
I get an error Run-time error 1004 Method 'Range' of object '_Global' failed Basicly what I want to do is select all rows with Column C = Independent When I run it with lengthofselect = 79340 the error occurs on the Range(RowNumHolderNew).Select statment When I run it with lengthofselect = 16 it runs fine and selects the Rows I want it to. Is there a limit that you can only select so many rows at once in the Range() function? Do you have a simpler way of doing this? i = 1 Do While Range("C" & i) < "" If Range("C" & i).Value = "Independent" Then RowNumHolder = i & ":" & i & "," & RowNumHolder End If i = i + 1 Loop lengthofselect = Len(RowNumHolder) RowNumHolderNew = Mid(RowNumHolder, 1, lengthofselect - 1) 'removes last comma Range(RowNumHolderNew).Select |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation items limit | Excel Discussion (Misc queries) | |||
Finding maximum qty of items to reach given limit | Excel Worksheet Functions | |||
Is there a limit to the number of items you can use in lists?? | Excel Discussion (Misc queries) | |||
Listboxes and select items in it | Excel Programming | |||
Limit to the number of items in a cell | Excel Worksheet Functions |