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: 553
Default Loading Sheets into a Customer Collection

I have a custom collection called Myworksheets. I want to load a certain
sheets into this collection. The syntax below works. I have two questions:

1) Can someone explain the syntax to me. Not sure what the difference is
between the sheet name in the bracket and the sheet name outside the bracket.

2) This assumes I know the names of the sheets. What if the sheet names
were loaded into a listbox. How would I adjust the code to loop through the
list box and load the sheets into my custom collection.

With MyWorksheets
.Add ThisWorkbook.Worksheets("Sheet1"), "Sheet1"
.Add ThisWorkbook.Worksheets("Sheet4"), "Sheet4"
End With

Thanks

EM
 
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
column widths change when loading customer Excel files crdman1 Excel Discussion (Misc queries) 0 April 20th 09 07:42 PM
customer style across sheets BorisS Excel Discussion (Misc queries) 0 March 12th 08 01:44 PM
CONVER CSV CUSTOMER DATA TO A CUSTOM INDIVI CUSTOMER PRICE SHEET brunod Excel Discussion (Misc queries) 1 July 7th 06 07:01 PM
creating a collection of Sheets references Eric[_27_] Excel Programming 1 February 6th 05 01:20 PM
collection of sheets mark Excel Programming 6 February 2nd 05 11:38 PM


All times are GMT +1. The time now is 01:55 AM.

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"