Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Did I miss something ??

Posted on 2000-04-03
3
136 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 143

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

838 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