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
151 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 67
Adding to a VBA? 6 78
Passing a Text Box name to a Sub 6 99
Excel Automation VBA 19 91
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

827 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