vettranger come here

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.
Who is Participating?
vettrangerConnect With a Mentor Commented:
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!
whtoutAuthor Commented:
Oh and I do have a book
it is titled "Foundations of Visual Basic4 For Windows 95 Programming"

whtoutAuthor Commented:
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?

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

whtoutAuthor Commented:
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?

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

Always name your forms things like :


and objects like list boxes something like :


That will keep you out of trouble with duplicate definitions.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.