multi-page control questions...

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

I'm trying to learn to use the multi-page control a
little, and started out right with the online help's
example.

However, when it tries to execute the line:

Set MyTextBox = MultiPage1.Pages
(MultiPage1.Value).Controls.Add
("MSForms.TextBox.1", "MyTextBox", Visible)

(line is not broken into 3 lines in the code, continuation
characters are not the problem),

I get the error:

***************
Run-time error '-2147221005(800401f3)':

Invalid class string
***************

Well, that's all well and good, but I assume it's actually
trying to tell me something?

My guess as to what that would be is that it doesn't
recognize the "MSForms.TextBox.1" part of the .add code?

But, assuming I'm correct, my trouble is that I don't know
where to go to fix that. I'm hoping others know.

And, if one were to want to switch from one page of a
multipage to another, in code, what ist the method or
command?

it's not .select it's not .activate, it's not .setfocus,
it's not .goto, it's not.....

what is it?

(and, I dont' suppose there's anyone who has yet come up
with a way to get MS Help to BE helpful?)
 
The following should work (and no, I can't explain why):

Dim MyTextBox As msforms.TextBox
Set MyTextBox = MultiPage1.Pages(MultiPage1.Value) _
.Controls.Add("Forms.TextBox.1", "MyTextBox", Visible)
 
The following should work (and no, I can't explain why):


Thanks, Vasant.

Do you know how to move from one page to another,
programatically?
 
Ahhh!

I noticed that the multipage control had a value method,
but I didn't think to try it for moving among the pages!

Thanks.
 

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

Similar Threads


Back
Top