View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TKGerdie
 
Posts: n/a
Default Possible? If total in a worksheet 0, highlight worksheet ta

The idea I am trying to accomplish is this: The main worksheet is the main
invoice sheet. All the other worksheets are price sheets for each contract
we have. Each price sheet has a cell at the bottom with the total amount on
that sheet. What I would like to do is if the people enter a total into that
individual price sheet, then the tab would be highlighted in a different
color. Then our Finance person would be able to tell very easily which tab
has the pricing in it. Does this help?

"TKGerdie" wrote:

I'm very, very new to VBA - just using the Microsoft on line training to
begin using it, in fact. Is there somewhere you would recommend I look to
better understand how to do this? The online training only speaks to using
Modules to have the code work when you run it yourself.

"MrShorty" wrote:


Yes, it is possible. You haven't given very many specific needs for you
procedure, but the basic VBA statement for what you want to do would
be:

If worksheets(1).cells(1,1).value0 then
worksheets(1).tab.colorindex=24

Change the worksheets() index to what you need, the cells reference to
the cell with the total in it, and the colorindex value to whatever
color you want. This statement could be placed inside a loop that
loops through any/all worksheets in the workbook. The procedure could
be associated with a button that you click to initiate the procedure,
or it could be placed in an event procedure so it runs automatically.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=486959