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: 1
Default Using an index with a class module?

I'm trying to learn about class modules. John Walkenach's book got me
started but left me wanting for much more.

I created my own class module, MySheet. I want to store the name of each
worksheet in my class module. I want to be able to do the following in a
workbook that has sheets in it:

Sub Example()
Dim objMySheet as MySheet, x as Integer
Set objMySheet = New MySheet
objMySheet.Find 'Populates MySheet with the names of every worksheet
For x = 1 to objMySheet.Count
MsgBox objMySheet(x).Name 'Display a worksheet name
Next
End Sub

What is the code for the class module so I can use the "objMySheet(x)."
style of programming? Also, if you know of any GOOD web sites that go into
detail about creating class modules I'd appreciate it :-) TIA!

Toby Erkson
http://www.bidata.net/


 
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
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
Class module Mark[_36_] Excel Programming 2 February 17th 04 03:14 PM
Class module David Excel Programming 4 December 31st 03 01:58 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 11:45 PM.

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

About Us

"It's about Microsoft Excel"