Solved

Did I miss something ??

Posted on 2000-04-03
3
139 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
[X]
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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses
Course of the Month4 days, 21 hours left to enroll

636 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