Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2004, 11:33 AM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default TabStrip

I am dynamically creating a tabstrip

ie

Set myTab = Me.Controls.Add("Forms.TabStrip.1", "TabStrip1", true)
    With myTab
        .Left = 6
        .Top = 6
        .Width = 654
        .Height = 444
    End With

How can I add tab pages to the tabstrip?

 
Old November 19th, 2004, 01:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:

    With myTab
        .Left = 6
        .Top = 6
        .Width = 654
        .Height = 100

        .Tabs.Clear
        .Tabs.Add 1, "Tab1"
        .Tabs.Add 1, "Tab2"

    End With
 
Old November 19th, 2004, 01:35 PM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried that before and no luck, that's why I'm confused!

 
Old November 19th, 2004, 01:38 PM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Birger!

I was doing something silly... on form_click instead of form_activate



 
Old November 19th, 2004, 01:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ahh - welcome to the 'Silly Coding Club'. I'm a senior member!
 
Old November 19th, 2004, 05:15 PM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

More questions...

How can I tie a control such as the tabstrip or a label to a container such as a frame?

 
Old November 19th, 2004, 05:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I haven't used tabstrips for years, so I don't remember the details.
See if you can get something from these sites. It's VB though, but I think the principles are the same for VBA. I saw devcity had a lot of Q's re. tabstrips.

http://www.vb-helper.com/howto_new_tab.html
http://www.devcity.net/forums/topic....12961#RID39327
 
Old November 20th, 2004, 05:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dkr72, I've been looking a little around and have found advise to use the MultiPage control instead of Tabstrip control.

They both are described as difficult to work with but unlike the TS the MP control serves as a container for other controls. That could be what you're looking for.
 
Old November 20th, 2004, 11:08 AM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for all your input Birger! The reason I'm stuck with the tabstrip is because I need to use the multirow property, which the multipage object does not have. But I do appreciate your feedback.

 
Old November 20th, 2004, 05:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

MultiPage1.MultiRow = True

..according to the Object Browser. (MsO2003)

You can't see it in the properties window.

For a MultiPage (a.o.) ex. see this page: http://www.cadvault.com/forums/archi...hp/t-2463.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabstrip controls osemollie Pro VB Databases 3 July 13th, 2006 04:58 PM
TabStrip Part II dkr72 Excel VBA 1 December 7th, 2004 05:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.