Solved

I am working with a Muti-page object, I want various things to change when one page has focus.

Posted on 2003-11-19
1
150 Views
Last Modified: 2010-05-03
I want various things to change when one page has focus, however I cannot get the form to recognize which page has focus and which does not.  I have tried the following however it did not work.  If there is a different type of object that I should use please let me know I am all ears!  Thanks for any help!!

------  Code  ------
Private Sub MultiPage1_Change()
    If MultiPage1.Value = Page1 Then
        CommandButton20.Visible = False
        CommandButton21.Visible = False
        CommandButton22.Visible = False
        CommandButton23.Visible = False
        CommandButton24.Visible = False
        CommandButton25.Visible = False
        cmdPOP.Top = 24
        cmdPOP.Left = 636
        CBNotice.Top = 42
        CBNotice.Left = 666
        Label5.Visible = True
    ElseIf MultiPage1.Value = Page2 Then
        CommandButton20.Visible = True
        CommandButton21.Visible = True
        CommandButton22.Visible = True
        CommandButton23.Visible = True
        CommandButton24.Visible = True
        CommandButton25.Visible = True
        cmdPOP.Top = 24
        cmdPOP.Left = 636
        CBNotice.Top = 42
        CBNotice.Left = 666
        Label5.Visible = False
    End If
End Sub
-------  Break  -------
0
Comment
Question by:gideonn
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 9781180
Try:

If MultiPage1.Value = 0 Then

ElseIf MultiPage1.Value = 1 Then

ElseIf ....

End if

or:

Select Case MultiPage1.Value
     Case 0

     Case 1

     Case ...

End Select


0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

776 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