LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Is there a limit to the number of items you can select?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation items limit Vinod[_2_] Excel Discussion (Misc queries) 2 October 4th 08 12:41 AM
Finding maximum qty of items to reach given limit Jashun Excel Worksheet Functions 1 October 18th 06 08:17 PM
Is there a limit to the number of items you can use in lists?? Elord92 Excel Discussion (Misc queries) 1 October 3rd 06 11:26 PM
Listboxes and select items in it droopy928gt[_4_] Excel Programming 6 March 3rd 06 12:32 PM
Limit to the number of items in a cell Jim_Bowie Excel Worksheet Functions 2 June 22nd 05 06:33 PM


All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"