+ Reply to Thread
Results 1 to 4 of 4

Can't write to Tag property on Tabstrip

  1. #1

    Can't write to Tag property on Tabstrip

    This one has really got me pulling my hair out!

    I want to store a short text string in the tag property of each tab on
    a tabstrip using, eg.
    Me.TabStrip1.Tabs(1).Tag = "newtag"

    I don't get any error doing this but when I try to retrieve the string
    I still get the default "Tab2"

    Does anyone else see get this result? Any ideas?

    Thanks,
    Andrew


  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Andrew

    I don't know why but this certainly doesn't seem to work with a tabstrip.

    Could you not use a MultiPage control instead? It seems to work fine with that.

  3. #3
    Nigel
    Guest

    Re: Can't write to Tag property on Tabstrip

    Hi
    AFAIK the Tag property is for the Tabstrip not the individual Tabs.

    Therefore you can set the Tag as......

    Me.Tabstrip1.Tag = "newtag"

    Your coding does not work for me in Excel 2002 either.

    --
    Cheers
    Nigel



    <[email protected]> wrote in message
    news:[email protected]...
    > This one has really got me pulling my hair out!
    >
    > I want to store a short text string in the tag property of each tab on
    > a tabstrip using, eg.
    > Me.TabStrip1.Tabs(1).Tag = "newtag"
    >
    > I don't get any error doing this but when I try to retrieve the string
    > I still get the default "Tab2"
    >
    > Does anyone else see get this result? Any ideas?
    >
    > Thanks,
    > Andrew
    >




  4. #4
    Andrew
    Guest

    Re: Can't write to Tag property on Tabstrip

    Hi Nigel,

    If you declare a variable as,
    Dim tb as msforms.tab
    then tb.tag is listed as an available property (ie. separate from the
    tabstrip tag). tb.tag will return the tag name of the tab in question
    (eg. "tab1" or "tab2" etc.) but it appears to be write only - I can't
    change the "tab2" to "newtabname".

    Never mind, I will store the names I want in an array instead. Thanks
    for testing for me.

    Cheers,
    Andrew


    "Nigel" <[email protected]> wrote in message news:<[email protected]>...
    > Hi
    > AFAIK the Tag property is for the Tabstrip not the individual Tabs.
    >
    > Therefore you can set the Tag as......
    >
    > Me.Tabstrip1.Tag = "newtag"
    >
    > Your coding does not work for me in Excel 2002 either.
    >
    > --
    > Cheers
    > Nigel
    >
    >
    >
    > <[email protected]> wrote in message
    > news:[email protected]...
    > > This one has really got me pulling my hair out!
    > >
    > > I want to store a short text string in the tag property of each tab on
    > > a tabstrip using, eg.
    > > Me.TabStrip1.Tabs(1).Tag = "newtag"
    > >
    > > I don't get any error doing this but when I try to retrieve the string
    > > I still get the default "Tab2"
    > >
    > > Does anyone else see get this result? Any ideas?
    > >
    > > Thanks,
    > > Andrew
    > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1