473,320 Members | 1,845 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,320 software developers and data experts.

Associating content to tabs via Tab Strip Control

Hi all, I'm making progress in the VBA learning curve, but need your help again. Application is a simple user form containing static info in several frames. No dynamic content to worry about at run time.

Problem: Associating specific content with specific tabs on a tab strip control at design time. Seems like that should be a slam dunk, but all I can find in searches is lots of coding for dynamically changing/adding tabs programmatically. Surely I must be able to designate what specific content (say, a frame with its associated controls) gets associated with tab1, what content gets associated with tab2, and so on, at design time. But how? I read about the tab collection editor that sounds promising, but my properties box for the tab strip control doesn't show how to activate that editor. Is that editor not a VB6 feature?

Simple once you know how, I'm sure, but till then, it's a mystery. Anyone? TIA

Annie
Mar 8 '10 #1

✓ answered by Guido Geurs

dear,

If it is VB via Excel than it is VBA !? (= Visual Basic for Applications).

This is an other environment than the real VB6.

If you are using VBA than you don't need the SSTab control because there is one standard in VBA= "Multipage" (see attached GIF).

A "tabstrip" is used to call frames or pictureboxes.
With this it is possible to place the frames where you want.
A "SStab" or for VBA "Multipage" has fixed pages in whitch you can place controls. see attached demo)

br,

10 9622
Guido Geurs
767 Expert 512MB
Dear,

I think you must select the "Properties" in the drop-down menu on the editor.
(see attached picture)

In this you can define all parameters for the tabstrip.

I hope this will help you.


br,
Attached Files
File Type: zip Properties of tabstrip.zip (18.0 KB, 702 views)
Mar 8 '10 #2
Thanks for taking the time to reply and include screen shots, but that doesn't do what I asked about. I need to find out how to launch the tab collection editor (I guess) or some other interface that lets me associate content with a particular tab on the tab strip at design time. I don't see that even in the screen shots you posted, and it certainly isn't on my properties box for the tab strip control.
Mar 8 '10 #3
vb5prgrmr
305 Expert 100+
In IDE, select tab, draw frame, select other tab to make sure frame dissapears, go back and make sure it reappears. If appears on all tabs, then select frame, CTRL+X select tab, CTRL+V, repeat visible test to make sure. Same goes for pasting controls into the specific frame...



Good Luck
Mar 9 '10 #4
Hi vb5prgrmr, I've tried your suggestions repeatedly without success. Selecting the tabstrip control and then pasting an existing frame on it or creating a new frame from the toolbox, either way, it doesn't get associated with one of the specific tabs on the tabstrip control. Maybe I should rephrase my original question:

Is there a way to associate frame (and other) controls with a specific tab on the tabstrip at design time, or does the frame control (or other page content) have to be programatically coded to associate (i.e. become visible) with the intended tab only at run time? If it's the latter, perhaps a code snippet for both the form initialization sub (I'm assuming that maybe the frames that will become the page contents of the various tabs have to be assigned to an array here? What's that statement look like?) and the tabstrip_click sub (show/hide) could be suggested. Thank you so much.

Annie
Mar 9 '10 #5
Guido Geurs
767 Expert 512MB
Dear,


I think there is a confusion between the components "Tabstrip" and "SSTab".

With a TabStrip you can't place components inside the Tab pages.
With a SStab it is possible to lock components inside like in a Picturebox or Frame.
= see GIF 3 where the frames are always outside the Tabstrip and with a SStab its inside.

When You select the 2e tab in the SStab: the frame id invisible.
see GIF 4.

see also attachment of VB6 files

The components are in =>
Tabstrip in: Microsoft Windows Common Controls
SStab in: Mocrosoft Tabbed dialog control (see GIF 5)

br,
Attached Files
File Type: zip Properties of tabstrip_v1.zip (35.9 KB, 452 views)
Mar 9 '10 #6
vb5prgrmr
305 Expert 100+
Yep, I think ggeu has that right about which control I was thinking about...
Mar 10 '10 #7
Thank you guys for your comments. I think part of the problem I am having is that I must have a "lite" version of VB6 (it's not stand alone, but only launches thru Excel, AFAIK) and it's missing some of the OCX files, including tabctl32.ocx and maybe some other ActiveX controls too. So, I don't have the SSTab control in my Toolbox. So a couple of other questions for the smart guys out there:

1) Can I just download the missing OCX files (if I can find them) and register them and they'll work with my version 6.4.99.69, and will that give me the expanded toolbox that includes SSTab functionality, etc?

2) If SSTab is so much better than TabStrip control, why would someone choose to use TabStrip anywhere or under any conditions?

3) In case I end up having to use a TabStrip control rather than SSTab, I have coding for the TabStrip_Click() event that I feel pretty sure is correct, but it's not displaying the correct frame controls as I click on different tabs. I'm wondering if I am not declaring the array of frames correctly. Can someone provide a snippet showing the correct syntax for declaring an array of 2 frames please? Also, where does that declaration go? In the general declarations for the form or inside a form_load sub or even the tabstrip_click sub?

I really want to make this tab thing work one way or the other, so I appreciate you guys helping me out.

Annie
Mar 12 '10 #8
Guido Geurs
767 Expert 512MB
dear,

If it is VB via Excel than it is VBA !? (= Visual Basic for Applications).

This is an other environment than the real VB6.

If you are using VBA than you don't need the SSTab control because there is one standard in VBA= "Multipage" (see attached GIF).

A "tabstrip" is used to call frames or pictureboxes.
With this it is possible to place the frames where you want.
A "SStab" or for VBA "Multipage" has fixed pages in whitch you can place controls. see attached demo)

br,
Attached Files
File Type: zip Properties of tabstrip_v3.zip (24.2 KB, 305 views)
Mar 12 '10 #9
Guido Geurs
767 Expert 512MB
dear,

If I use SSTab in VBA Excel I get an error that the Xcontrol is not save !
AND I can't put an other control in it !! (Even with Ctrl X - Ctrl V)

Attached is the GIF of the error and the OCX if You want to try it.

br,
Attached Files
File Type: zip demo with sstab and OCX.zip (132.8 KB, 361 views)
Mar 12 '10 #10
Thank you so much ggeu. Using the multipage control is so easy, and does exactly what I want. I still don't really know in what situation the tabstrip would get used, but for now, multipage has solved the problem for me. Also, it sounds like maybe I can't just download the missing OCX files and give my VBA editor the other VB6 controls, like SStab, etc. Thanks to all who offered suggestions. Annie's happy again.
Mar 13 '10 #11

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

Similar topics

0
by: Dan | last post by:
I know how to use a manifest file to get the XP look for the Windows Common Controls 6 group of controls but I also have both the tabbed dialog and tab strip controls in my app and I want those to...
1
by: Pino Carafa | last post by:
I've designed an aspx page with a Tab Strip on it. The problem is that unlike some of the simpler controls like text boxes and buttons and the likes, this Tab Strip is rendered something like this:...
2
by: Le, Thanh-Nhan | last post by:
Hi, How can I send a text (string) or content of a control on a form to printer? Thanks Nhan
0
by: Haim | last post by:
Hello All, I am using the Microsoft tab strip control (with multi page) in my ASP .NET application. When I am moving from one tab to another I need to check the current page before I am...
0
by: Syed Hussain via DotNetMonster.com | last post by:
Dear fellows i m new to asp.net, i have to develop a search engine for an intranet application. Currently we are using a client server applicaton using vb.net but i have to convert this...
1
by: Priya | last post by:
Hi , I'm creating a custom control for a web project. I wanted to add flash content as part of that control. How do i do that in C# file. Pls help. Thanks in advance, Priya
8
by: M K | last post by:
How do you hide individual tabs? I have tried .Hide() but it hides them all? Mark
0
by: sandeepthoppil | last post by:
Hi I dont know whether I am doing something wrong here. But this is very strange thing I have noted with menu strip control. I am using VB 2005. I am using a menu strip control as the main menu...
1
by: pavankumar106 | last post by:
wat is tab control can any1 tell me wit ex how to use tab control?
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.