Solved

Did I miss something ??

Posted on 2000-04-03
3
132 Views
Last Modified: 2010-05-02
Here is something that does not make sence to me at this moment.  On a form I have a button and all I want it to do is end the program.  I put in the code that I thought would work and it fails with an error "Method or data member not found" and then is highlighted on the button Click.  Code follows:

Private Sub CloseProgram_Click()

    DickensenPrint.Close
   
End Sub

From what I can see this is about as simple as can be.  But why wont it work.  From what I can remember from versions 4 and 5 all I had to do was put in me.close in a command button click event and the program would end.  But this one fails.  I am confused as to why?  BTW this is done in VB6.0 Pro.

TIA

Craig
0
Comment
Question by:csindorf
3 Comments
 
LVL 1

Expert Comment

by:tkuppinen
Comment Utility
Try the unload statement.

In your case it would be

Private Sub CloseProgram_Click()
   
     unload me
     
End Sub

0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 20 total points
Comment Utility
I suppose that your form is called DickensenPrint
Your statement will read
Unload DickensenPrint
or if the button is on the form itself
Unload me
0
 

Author Comment

by:csindorf
Comment Utility
TKS
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now