Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6354453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:34:41+00:00 2026-05-24T22:34:41+00:00

In a Visual Basic 5 file (.vbd), how do I call userDocument terminate from

  • 0

In a Visual Basic 5 file (.vbd), how do I call userDocument terminate from userDocument Hide?

Option Explicit

Private Sub Command1_Click()
    MsgBox "hello World"
End Sub

Private Sub UserDocument_Hide()
    MsgBox "Before Termination"

    <I want UserDocument termination here>

    MsgBox "After Termination"
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:34:42+00:00Added an answer on May 24, 2026 at 10:34 pm

    While you can call the same code that occurs on termination, you can’t actually terminate the object.
    Object termination occurs when all references to it are released, and implicitly all code running in it exits.

    For what you want to do, you have to get whatever created/is using your UserDocument to release it.
    You may be able to do this by putting an event in your object and calling it from the Hide event that that caller listens for and releases it.
    Obviously, if the caller is not your code, you can not do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to start a Visual Basic script file by using WMI in a
I need to write an error log to a XML file using Visual Basic
in visual basic i can open a binary(exe) file with below way : Strx$
I recently updated my Visual Basic 6.0 application and now include an exe.manifest file
How would I open a program within Visual Basic 2010? (Like running Application.txt from
I have acquired a DLL that was created in Visual Basic from a third
How can I create a setup file in visual basic 6 after completion of
How can I register a Visual Basic 6.0 DLL file in the global assembly
Within a Visual Basic Project I have added a resource file (resx) that contains
I needed to print a .bmp file to a printer using Visual Basic 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.