Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inconsistent results with function call....?


If the sub name is set for a command button i.e. Name_Click() then you
may need to copy it into an new sub without the _click. i.e. Name().
That is the only way I have ever been able to get it to work.

Hope it helps.


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=486457

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Inconsistent results with function call....?

Goober,

Thanks for the reply. I tried your suggestion but with no luck. Then I
noticed I was a moron and figured out what was wrong. FYI I called the button
("_click") procedure with no problems.

Thanks again.

"goober" wrote:


If the sub name is set for a command button i.e. Name_Click() then you
may need to copy it into an new sub without the _click. i.e. Name().
That is the only way I have ever been able to get it to work.

Hope it helps.


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=486457


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WORKDAY() results appear to be inconsistent... dplum Excel Worksheet Functions 0 July 26th 08 05:59 PM
Formula results inconsistent. CyberTootie Excel Worksheet Functions 3 October 15th 06 03:20 PM
IF function comare to identical amount but inconsistent results skhuon Excel Worksheet Functions 1 July 28th 06 10:07 PM
Inconsistent results with =LOOKUP? watkincm Excel Worksheet Functions 2 May 31st 06 08:21 PM
Inconsistent Array Count results Suzanne Excel Worksheet Functions 5 April 6th 06 05:02 PM


All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"