473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Add page to TAB CONTROL

759 512MB
Hi again !

I use MS OFFICE 2007.

When insert a TAB CONTROL (from the ribbon) in my form, it has 2 pages.
But I need more and I can not find a way to do that.

Any ideas ?

Thank you !
Apr 21 '11 #1

✓ answered by TheSmileyCoder

Been a while since I used tab controls. I believe you right click one of the existing page tabs to insert a new page.

3 15286
TheSmileyCoder
2,322 Expert Mod 2GB
Been a while since I used tab controls. I believe you right click one of the existing page tabs to insert a new page.
Apr 21 '11 #2
Mihail
759 512MB
Ufffff TheSmileyCoder !!!!!!!!

YES. That is.

I expect to be an option in the PROPERTIES pane.

Your answer is the best, of course, but, because I "solve" somehow this task, see and wonder:

Create a new module (or use an existing one).
In that module place this code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub AdPageToTABControl()
  2. Dim frm As Form
  3. Dim tbc As TabControl
  4.  
  5.     Set frm = Forms!Calcul 'Calcul is the name of my form. _
  6.                     Use the form name, not VBA form name (Form_Calcul)
  7.     Set tbc = frm!TabControl
  8.  
  9. 'To add page:
  10.     tbc.Pages.Add   'Add a page AFTER the last existing page
  11. '   tbc.Pages.Add(Before)
  12.  
  13. 'To remove page:
  14.     tbc.Pages.Remove 'Remove the LAST page
  15. '   tbc.Pages.Remove(Item)
  16. End Sub
and RUN it.

This code work only if the form is in DESIGN mode. (?!?!?!)

Maybe someone else can find the utility of this code. Now, after your answer, the utility for me is NULL.

Thank you very very much !
Apr 21 '11 #3
TheSmileyCoder
2,322 Expert Mod 2GB
Good to see you got it working.

The adding and removal of controls can only be done in design view. However you can change the visibility of individual tab pages at runtime. So depending on your needs should you need to modify the amount of tabpages at runtime, you could create extra tabs and simply hide them until needed. It is however not the most flexible approach.
Apr 26 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jaweed | last post by:
Hi I'm developing an ASP.NET app in Visual studio (using C# for code behind). My question is fairly simple (i think). When I go to the code behind page, the controls in the html page are made...
4
by: James Thomas | last post by:
Hello - I am attempting to override the Page control so it outputs a simple copyright message at the bottom of every page. The problem I'm running into is that it puts said message below the...
1
by: Paul Mason | last post by:
Hi folks, Just wondering if anyone has any idea if/when W3C likelly to include functionality for page control (panels, tab controls etc) or whether there are any tools that allow the...
0
by: David | last post by:
In ASP.NET 2.0, is it possible to use a control that's on a Master Page as a select parameter in a content page's datasource control? For example, the Master Page has a drop down list of...
3
by: David | last post by:
In ASP.NET 2.0, is it possible to use a control that's on a Master Page as a select parameter in a content page's datasource control? On the content page in the VWD Configure Data Source wizard...
2
by: Frankie | last post by:
I have a user control into which I insert a bunch of controls dynamically. I have it all working just fine - Everything is there on Postback, etc. I load this user control into a hosting ASPX...
4
by: Hugh O | last post by:
Hi, I have been able to use the following kinds of code to access basic information on the individual controls that would be in any Web page. ?Me.Controls(1).Controls(56).GetType.Name ' ...
0
by: antoine.marie | last post by:
Hi all, Basically, I want to write something like this to hide a page control: CType(currentPage.FindControl("theControlName"), Label).Visible = False But, I want the controlName , and the...
10
by: Roy | last post by:
How do I read the value of an html input control from inside a javascript user control? An aspx page contains a user control that attempts to read a value from an html input control in the aspx...
0
by: philaphan80 | last post by:
Is there a way to force the Visual Studio IDE (Page Control at design- time) to refresh / repaint itself upon drag & drop of *any* item from the toolbox? Perhaps a method I need to override within...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.