Excel Crashes when trying to open a User Form
There's nothing obviously wrong with the code in context with the limited
information you have given.
Regards,
Peter T
"Brian" wrote in message
...
When I open the workbook and click on the worksheet to open the user form
excels stops working. I get Microsoft Office Excel has stopped working and
is
trying find a solution, but it never does.
I have saved it in both 2007 & 2003 versions and both get the same
problem.
What is odd is if you open the Userform Workbook, then open the VBA code
window, both userform versions run fine, but if you do not open the Code
window Excel locks up everytime.
Here is the code.
Sheet 2 Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
UserForm1.Show
End Sub
UserForm1 Code:
Private Sub UserForm_Initialize()
With Me.Address_21
.AddItem "1"
.AddItem "2"
.AddItem "3"
.AddItem "4"
.AddItem "5"
End With
End Sub
|