Multipage problem

G

Guest

I have 4 CommandButtons in a sheet. Each button opens the same form with a multipage on it. Each CommandButton must open a specific page in the multipage. I call my form like this

MyForm.Sho
MyForm.MultiPage1.Value =
DoEvent

The first time I click the CommandButton it opens the last used page in the multipage instead of calling the page I want. If i close my form and call it for the second time, using the same button, I get the page I want
DoEvents Doesn't seem to have any affect at all.
 
M

Mark

if i well understand, try:
pages and index e.g.

MyForm.MultiPage1.Pages(1).Index = 1

HTH
Regards
Mark
-----Original Message-----
I have 4 CommandButtons in a sheet. Each button opens the
same form with a multipage on it. Each CommandButton must
open a specific page in the multipage. I call my form like
this:
MyForm.Show
MyForm.MultiPage1.Value = 3
DoEvents

The first time I click the CommandButton it opens the
last used page in the multipage instead of calling the
page I want. If i close my form and call it for the second
time, using the same button, I get the page I want!
 
G

Guest

I don't want to change the placement of the pages, I just want to get focus on the selected page!
 
T

Thomas Ramel

Grüezi akyhne

akyhne schrieb am 24.05.2004
I have 4 CommandButtons in a sheet. Each button opens the same form with
a multipage on it. Each CommandButton must open a specific page in the
multipage. I call my form like this:

MyForm.Show
MyForm.MultiPage1.Value = 3
DoEvents

The first time I click the CommandButton it opens the last used page in
the multipage instead of calling the page I want. If i close my form and
call it for the second time, using the same button, I get the page I
want!

Just define the Value of the multipage and show it then, so switch your
code-lines:

MyForm.MultiPage1.Value = 3
MyForm.Show

--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]
 

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