Adding a page to a tab control

K

Ken

I have code that is supposed to add a new page to a tab control but I am
getting an error:

Run-time error '2147': You must be in Design view to create or delete
controls.

I looked at the example code and thought all I needed to do to add a page was

me.tabctl.pages.add

What am I missing?
 
R

Rick Brandt

Ken said:
I have code that is supposed to add a new page to a tab control but I
am getting an error:

Run-time error '2147': You must be in Design view to create or delete
controls.

I looked at the example code and thought all I needed to do to add a
page was

me.tabctl.pages.add

What am I missing?

That you are attempting a change that cannot be done except when in design
view (like the message says). You can make some temporary property changes
in normal view like size, visibility, color, etc., but there are certain
things you cannot do and adding a tab page is one of them.

Add all the pages you will need in design view and make them visible as
desired in normal view instead of trying to create them.
 

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