Adding a page to a tab control

  • Thread starter Thread starter Ken
  • Start date Start date
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?
 
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.
 
Back
Top