Excel VBA - ERROR TRAPPING HELP!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brenty66
    New Member
    • Jan 2008
    • 7

    Excel VBA - ERROR TRAPPING HELP!!!

    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.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    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?
    Last edited by Killer42; Jan 18 '08, 03:44 AM.

    Comment

    • brenty66
      New Member
      • Jan 2008
      • 7

      #3
      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.T ext = "1162-90" Then
      Sheets("1162-90").Range("A65 536").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

      Comment

      • brenty66
        New Member
        • Jan 2008
        • 7

        #4
        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.T ext = "1162-90" Then
        Sheets("1162-90").Range("A65 536").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

        Comment

        Working...