LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Problem with Worksheet collections... :(

See first code in
Collections
http://www.mvps.org/dmcritchie/excel/collections.htm
and comment out what you don't need

'--dim wkBook as Workbook
dim wkSheet as Worksheet
'--for each wkBook in Workbooks
for each wkSheet in Application.Worksheets
'ooo--- your code here ----ooo
msgbox " -- " & wkSheet.Name
next wkSheet
'--next wkBook


--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"abxy " wrote in message ...
I posted a thread about 4 days ago with a question similar to this, but
only got one reply which didn't help much, so here I go again(with more
detail this time):

this is my code right now:

With Worksheets("06").Range("A1:A275")
Set C = .Find(What:=Right("0000000" & textbox1.Value, 7),
lookat:=xlWhole)


ok, now you see how i'm only referring to one sheet ("06")? Instead,
i'd like to refer to all the sheets in the workbook. Either that or
refer to a range of worksheets. I can't use the "sheets(array(sheet1,
sheet2)" method because this workbooks is updated daily and I can't
refer to specific sheets unless it's a range to say "everything between
this sheet and that sheet" ...actually i need to refer to 3 different
workbooks (all the same range, and all of which will already be open).

any help? :( :(


---
Message posted from http://www.ExcelForum.com/



 
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
Help with collections ksnapp[_45_] Excel Programming 1 April 7th 04 12:42 AM
Clearing Collections Tommy T Excel Programming 0 February 4th 04 05:51 PM
Using Collections Kerry[_4_] Excel Programming 1 January 25th 04 04:08 PM
Collections Lookups Dave Curtis[_3_] Excel Programming 1 December 3rd 03 09:15 AM
Comparing Collections Tom Ogilvy Excel Programming 1 September 17th 03 06:15 PM


All times are GMT +1. The time now is 04:04 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"