Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


vettranger come here

Posted on 1999-07-29
Medium Priority
Last Modified: 2010-04-30
I feel bad for what I did,
If you can answer this question I will give you the points
Now that I know how to alter the variables, how do I open a new form? I have two forms designed, I want to open the second one when the user clicks on a button or menu item,
and I want to display the value of X in a form uneditable by the user.
Again I feel terrible, and everyone give vettranger first shot at the question.  I cheated him on some points, not meaning to.
Question by:whtout
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
  • 4
  • 2

Author Comment

ID: 1528350
Oh and I do have a book
it is titled "Foundations of Visual Basic4 For Windows 95 Programming"


Accepted Solution

vettranger earned 280 total points
ID: 1528351
Hi whtout,

Given that the name of your second form is Form2, then :

loads and displays the form.

When you want to get rid of it :

Unload Form2

If you want an exit button on a form to close the form, then

Unload me

The "unload me" syntax is helpful in case you change the name of the form. In that case you wouldn't have to find and change your code to unload the form.

McKelvey's "Using Visual Basic 5" is an excellent book to take you from simple project and programming concepts right into the complicated stuff. The content is actually in context for VB4 thru VB6 for the most part. It would cost you about $32 at Barnes and Noble online. If you're going to be doing much VB programming, its $32 well spent!

Author Comment

ID: 1528352
I have named my second form as Cash.frm
I want that form to appear when you click on the menu item "Check Cash Remaining"
When I go into the code for this option
and type I get an error that says Value Not Defined (I know this is because I dont have a form titled Form2)
but when I say and run it I get an error that says
Invalid Qualifier
Why Is this and how do I fix it?

Industry Leaders: 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!


Author Comment

ID: 1528353
Here is Something new, If I select my form titled Cash and change the name to Form2 and change the code on the menu item it works
But if the form name is Cash I get an invalid qualifier.
Oh could it be because I also have a variable called Cash
and the program is having conflicts?


Author Comment

ID: 1528354
Forget my last comment. I figured it out, so I will give you the points


Expert Comment

ID: 1528355
Always name your forms things like :


and objects like list boxes something like :


That will keep you out of trouble with duplicate definitions.

Featured Post

Industry Leaders: 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

715 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