Making Frames Visible (or not)

D

dunnerca

I am working on an application and thought that it would be easy to create a
number of forms on a dialog box with a menu on the top of the dialog box.
Depending on which button was clicked on, a frame would be made ".visible"
and all the other frames would be set to ".visible=false". Once I make the
first frame visible, I don't seem to be able to get that frame to become
invisible and another frame visible. Is there something obvious I'm missing?
 
B

Bob Phillips

This simple code works

Private Sub CommandButton1_Click()
With Me

.Frame1.Visible = True
.Frame2.Visible = False
.Frame3.Visible = False
.Frame4.Visible = False
End With
End Sub
Private Sub CommandButton2_Click()
With Me

.Frame1.Visible = False
.Frame2.Visible = True
.Frame3.Visible = False
.Frame4.Visible = False
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top