Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Tough questions

here are some problems I found recently and would like some answers

1) The help window in VBA doesn't close. This started recently but cannot
get it closed unless I log off. Don't know why

2) Can anything be done to stop Worksheet_Change from recusively being
called when an entire row gets added or deleted. I added code to return if
the Target.address is not in the form $3:$3 so my code only gets called one.
Any suggestions.

3) Is there any way that the Worksheet_Change macro would know whatt action
called it. Needed tto know if an entire row was being added or deleted.
Didn't know how to tell the diffference.


4) Changing background color of cell does not automatically update
worksheet. I generated the function below. When I changed color of
referenced cell the value return by the functtion did not change. Can
anything be done tto havve excel recognize a color change and tthen
automatically reclculate the worksheet.

Function GetColorValue(Target As Range)
'
' GetColrovalue Macro
' Macro recorded 2/28/2007 by Joel
'

'
GetColorValue = Target.Interior.ColorIndex

End Function



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Tough questions

1) Have no idea - never heard of it as a problem

2) Yes, defensive programming is the solution. If you will perform actions
in an event that will fire the event, then you need to set enable events to
false before performing the action and turning them back on after or use an
IF statement to prevent code from firing except under certain conditions.

3) Target is the only indication provided by the change event.

4) No, changing color does not cause a recalculation or trigger any events.

--
Regards,
Tom Ogilvy




"Joel" wrote:

here are some problems I found recently and would like some answers

1) The help window in VBA doesn't close. This started recently but cannot
get it closed unless I log off. Don't know why

2) Can anything be done to stop Worksheet_Change from recusively being
called when an entire row gets added or deleted. I added code to return if
the Target.address is not in the form $3:$3 so my code only gets called one.
Any suggestions.

3) Is there any way that the Worksheet_Change macro would know whatt action
called it. Needed tto know if an entire row was being added or deleted.
Didn't know how to tell the diffference.


4) Changing background color of cell does not automatically update
worksheet. I generated the function below. When I changed color of
referenced cell the value return by the functtion did not change. Can
anything be done tto havve excel recognize a color change and tthen
automatically reclculate the worksheet.

Function GetColorValue(Target As Range)
'
' GetColrovalue Macro
' Macro recorded 2/28/2007 by Joel
'

'
GetColorValue = Target.Interior.ColorIndex

End Function



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
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
Tough one Ben Excel Discussion (Misc queries) 3 December 11th 06 05:13 PM
Tough one erikkeith via OfficeKB.com Excel Programming 9 May 10th 06 12:20 PM
Here is a tough one! Michael Smith Excel Programming 2 September 16th 05 01:14 PM


All times are GMT +1. The time now is 01:36 PM.

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"