By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Excel VBA - ERROR TRAPPING HELP!!!

P: 7
I have a userform used as an interface to store information on excel spreadsheets. I have put a decent amount of work into it to this point and all of a sudden I am getting a catastrophic error message. It pops up every now and then when I try loading the userform. When I select OK it will then show a runtime Error 361 "Can't load or unload object" At this point it will usually close out of excel and ask to send an error report. Sometimes I can load it fine and then other times it will give me these messages.
I have taken a couple of classes for VBA, but for the most part am self taught. This is why I have trouble when I get a bug in my code. Please Help - very frustrated with this roadblock. If there are any suggestions as to where to start with this or any light at all that you can help with it would be greatly appreciated. Thanks in advance.
Jan 18 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
Can you give us the details of the catastrophic error? And show us any code which would be executing at the time? Also, what controls are on the userform?
Jan 18 '08 #2

P: 7
Thanks for the reply. The userform has mostly text boxes, drop down lists. The only code i have in the userform initialize procedure is like the example that follows:
With cboMWRNumber1
.AddItem "1107-90"
.AddItem "1180-90"
.AddItem "1182-90"
.AddItem "1185-90"
End With

Which places the information in the drop down lists. There isn't any code in the workbook.
The only other major code in it is as follows:

If cboMWRNumber3.Text = "1162-90" Then
Sheets("1162-90").Range("A65536").End(xlUp).Offset(1, 0).Value = txtTagNumber
End If
Which puts a value into the corresponding worksheet (next available open cell in that row)

Other than that all the other code etc. is pretty straight forward. Let me know if there is any other info you would like/need. Thanks
Jan 18 '08 #3

P: 7
Thanks for the reply. When I click help on the catostrophic error it just says that either an external error exists or something in the code...(can't remember what the tail end of it was)
The userform has mostly text boxes, drop down lists. The only code i have in the userform initialize procedure is like the example that follows:
With cboMWRNumber1
.AddItem "1107-90"
.AddItem "1180-90"
.AddItem "1182-90"
.AddItem "1185-90"
End With

Which places the information in the drop down lists. There isn't any code in the workbook.
The only other major code in it is as follows:

If cboMWRNumber3.Text = "1162-90" Then
Sheets("1162-90").Range("A65536").End(xlUp).Offset(1, 0).Value = txtTagNumber
End If
Which puts a value into the corresponding worksheet (next available open cell in that row)

Other than that all the other code etc. is pretty straight forward. Let me know if there is any other info you would like/need. Thanks
Jan 18 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.