Solved

Did I miss something ??

Posted on 2000-04-03
3
135 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
ID: 2679961
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
ID: 2679962
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
ID: 2679977
TKS
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 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