View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dominic Dominic is offline
external usenet poster
 
Posts: 26
Default Inconsistent results with function call....?

With the help of the posts at this site, I've managed to achieve a fairly
crude application for someone here in the office.

However, I am currently stuck. I hope someone will take the time to help me.

I have a sheet with data in rows across multiple columns (18). I have a
button on the sheet to add another sheet. This procedure asks for the user's
input for a sheet name. The procedure then copies the current sheet to a new
sheet with the user's input as its name. It then deletes all the data in a
specified range of cells (all data cells). It then sets the
interior.colorindex to "None". This is because there is a workbook_change
event that changes the interior.colorindex to "Blue".

All this works fine. However, I have on the sheet code (from Bob Phillips)
to count based on font.colorindex. This code works great. The problem I am
having (sorry to be so long winded) is that when the new sheet is created
(copied) and the cells are deleted (set to ""), the font.colorindex remains
the same. I have a button to "Calculate Colors" which searches for blank ("")
cells and set the font.colorindex to 1. This works perfect as a button.
However, trying to call this procedure at the end of the "MakeSheet"
procedure isn't working. I've tried everything I can think of. I tried to
call the "Calculate Colors" procedure at the end of the "MakeSheet" procedure
with no success. I have also copied and pasted the code from "Calculate
Colors" to the end of "MakeSheet" procedure with no success either. If I
simply click this button on the new sheet, it acheives the desired results???

I can provide my code if necessary. Does anyone have any ideas on what I am
missing? Thank you very much.