activating a page of a multipage control

A

Arne

Hello,

I want to chek user input on a page (index 1) of a multipage control as
soon as another page is selected. I have something like this:

Private Sub mpProcessData_Change()

If lngLastPage = 1 Then
If Not PageOK Then
Application.EnableEvents = False
mpProcessData.Value = 1
Application.EnableEvents = True
End If
End If
lngLastPage = mpProcessData.Value

End Sub

Apart from the fact that it does not work (only the tab is selected not the
page, regardless whether EnableEvent is enabled or not), I do not like it,
because I am forced to declare the global variable lngLastPage. Is there a
better way to do this?

TIA,

Arne
 
B

Bob Phillips

The tab is the page. Why does lngLastPage have to be global? Page indexes
start at 0 BTW.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
A

Arne

Bob Phillips said:
The tab is the page. OK, fine, but how do I get the page that corresponds to the tab displayed? The tab (#1) is activated alright, but not the page 'attached' to it. So, the problem remains

Why does lngLastPage have to be global? Because it would go out of scope if
it were defined in the Event sub? The scope of that variable therefore has to
be the module of the form on which the multipage is displayed, I think(?)

Page indexes
 
B

Bob Phillips

The tab (#1) is activated alright, but not the page 'attached' to it. So,
I have no idea what you mean by that.

Declare it as Static and it won't.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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