Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create Highlighter Toolbar button

Status
Not open for further replies.

nikka

Instructor
Mar 11, 2001
36
ZA
How can Create a highlighter button and expand the color palette to allow me to create my own blends of color?

Thanks

Nikka
 
Are you using any particular area or colour to highlight?

dyarwood
 
To look at a bigger colour palette using Tool > Options then click on the Colour tab and click modify

dyarwood
 
Hi nikka,

What version of what Application are you working with? In Excel you can change the palette but you can only have 56 colours at a time; in Word there are differences between '97 and 2K but I can't remember them off the top of my head.

Enjoy,
Tony
 
Hi Tony
I am working in 97 and 2000. It is also for Word but the macros are normally interchangeble.

Thanks

Nikka
 
For Excel try

Use the following macro

ActiveCell.Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With

This colours the current cell yellow.

To set a custom button do the following

View -> Toolbars -> Custom

Click on the commands tab.

Scroll the categories then click on macros.

Click and drag the Custom Button onto a tool bar. Then assign that button to a macro.

Not sure if that helps

dyarwood
 
For word the macro might be like the following

Selection.Range.HighlightColorIndex = wdYellow
 
Hi nikka,

As far as I know you can't create a tailored split button like the MS provided ones. If you really want to provide your own palette you're looking at custom toolbars all down the line - a major undertaking for a minor gain I would suggest. If it helps here is some basic information as best I can recall it.

If you are using Word 97 your options are very limited - just a handful of colours (18, I think) available and no way to extend. Use the ColorIndex, Highlightcolorindex, etc. Properties to set them.

Word 2000 allows you to use any colour for text via the Color property or the More.. option on the button, but still the same limit for highlighting. If you change colours in 2000 and then open your doc in 97 I think the colour is changed permanently to the closest match 97 can make.

Excel has a palette of 56 colours which you can set to be any RGB colour combinations you choose. Text, highlighting, etc can only be set to a colorindex - not an absolute colour so if you later change the colour of a colorindex anything set to that colorindex value will be changed.

I hope that makes sense.

Enjoy,
Tony
 
I would like the user to decide what color to use. I know I need to use an add in, but just not sure which one. I have a scren shot of what I am wanting to do but unfortunately can't post it here.

Thanks nikka
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top