Thread: Control Arrays?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jamie Collins Jamie Collins is offline
external usenet poster
 
Posts: 593
Default Control Arrays?

(Jamie Collins) wrote ...

You could use the class in the ThisWorkbook code module like this:

Private Chk1 As Class1
Private Chk2 As Class1
Private Chk3 As Class1


I forgot to address the subject of the thread! The above declarations
could alternatively be put into an array e.g.

Private Chks(2) As Class1

Private Sub Workbook_Open()

Set Chks(0) = New Class1
Set Chks(1) = New Class1
Set Chks(2) = New Class1
Chks(0).Init Sheet1.CheckBox1
Chks(1).Init Sheet1.CheckBox2
Chks(2).Init Sheet1.CheckBox3

End Sub

Jamie.

--