Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Unload Me" question "Runtime error 361 Can't load/unload this ob

Status
Not open for further replies.

YACHTIE

Technical User
Feb 17, 2004
77
CA
Hi again,
I have found and modified the following code to suit my needs but the "Unload Me" keeps frustrating me. Don't really know whether or not I need it either.
It appears to work OK without it but as it was there intially am wondering why???
Appreciate any help with this I am more curious than....
Code:
Dim strAddItem As String
    strAddItem = ProdProcEntry.Text
    If strAddItem = "" Then
        MsgBox "Enter something intelligent, Please!!"
      FocusTextBox
        Exit Sub
    Else
        Dim aDoc As Document
        Set aDoc = ActiveDocument
        aDoc.FormFields("DropdownProdProc").Result = strAddItem
        Set aDoc = Nothing
    End If
    [b] Unload Me[/b]
End Sub
 
It's there because your downloaded code was originally in a form (probably VB). It would have fired the "Unload" event in VB, but in VBA you don't need it. The reason it's giving you an error is the object "ME" is unknown to VBA. Of course, the "Unload" event is also unknown.

calculus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top