Can't write to Tag property on Tabstrip

H

hooksie2

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
 
N

Nigel

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.
 
A

Andrew

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top