Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically create pages in MultiPage control

Status
Not open for further replies.

mpemberton

Programmer
Mar 5, 2002
37
0
0
US
I know this must be easy, but I'm failing to get it to work.

I simply want to dynamically add a new page in a multipage control. I thought it was as simple as this code:

Code:
frmMyForm.MultiPage1.Pages.Add("Page 3","Page 3",2)

However, it is stating it was looking for an "=". I attempted to assign it to a new object variable, but didn't like that either.

Any words of advice?
 
Ok, apparently I'm not 100% sure why this code works, but here's how I got it to work:

Code:
MultiPage1.Pages.Add ("test")

I left off the reference to the form and didn't fill in the additional arguments. I haven't performed any more testing to find the actual problem, but thought I'd at least share this with everyone.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top