Change the color of a Tab Form Caption

G

Guest

Hello,

I would like to change the color of a tab form caption from black to red
when you click on it. Is there a way to do this? I have tried
Form!FrmName.captionname.Forecolor = vbRed and several other attempts, but
can't seem to get it to work.

Any help appreciated.
Connie
 
M

Marshall Barton

Connie said:
I would like to change the color of a tab form caption from black to red
when you click on it. Is there a way to do this? I have tried
Form!FrmName.captionname.Forecolor = vbRed and several other attempts, but
can't seem to get it to work.


Well, that syntax doesn't make sense and I can't unravel
what you are trying to do from what you said above.

The Form's Caption is what's displayed in the form window's
title bar and the title bar colors are specified in Windows
Display Properties settings so can not change its color.

If by caption you mean a label control somewhere in the
form, then you would use:
Me.labelcontrolname.Forecolor = vbRed

If you mean something else, please provide more specific
information so we can figure out what you're trying to do.
 
J

Jeff

Connie said:
Hello,

I would like to change the color of a tab form caption from black to red
when you click on it. Is there a way to do this? I have tried
Form!FrmName.captionname.Forecolor = vbRed and several other attempts, but
can't seem to get it to work.

Any help appreciated.
Connie


Hi Connie
As far as I'm aware (and I've searched this too) you can't change the
colors on the tabs captions.

There's one way using code at http://www.lebans.com/tabcolors.htm. Take
off the part where the text is rotated and change the colors for your
specific tastes.

Jeff C
 
S

Steve Schapel

Connie,

Another approach is to set the Style property of the Tab Control to
None, and then put Command Buttons on the form, or else Toggle Buttons
within an Option Group, with code to move from one tab page to another.
You then have control over the font/colour on the buttons.
 

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