J
James
Hi Guys
I have created an AD-in in Excel 2002 (win 2k). It works
fine in Excel format but when I convert it to Add-in I run
into problems.
The following userform event errors out (Run time 91,
obeject variable or with block variable not set)
It happens only when Know other work book is open and Add-
in is open on its own.
Is there a way to ceate a new workbook if know other
workbook is present , select it so that it does not
encounter the error.
Thanks a lot
Private Sub UserForm_Initialize()
Dim WB As Workbook
For Each WB In Workbooks
If WB.Windows(1).Visible = True Then
Me.ListBox1.AddItem WB.Name
End If
Next WB
End Sub
I have created an AD-in in Excel 2002 (win 2k). It works
fine in Excel format but when I convert it to Add-in I run
into problems.
The following userform event errors out (Run time 91,
obeject variable or with block variable not set)
It happens only when Know other work book is open and Add-
in is open on its own.
Is there a way to ceate a new workbook if know other
workbook is present , select it so that it does not
encounter the error.
Thanks a lot
Private Sub UserForm_Initialize()
Dim WB As Workbook
For Each WB In Workbooks
If WB.Windows(1).Visible = True Then
Me.ListBox1.AddItem WB.Name
End If
Next WB
End Sub