LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Worksheet _Calculate event handler_how to use

Here is the problem...

User selects from a drop down validation box an option (say option 1)

This displays a word(FAS in this example) in another Cell, say in E4.
I want an EVENT to run if cell E4 has a value - so if E4 has the value
"FAS," I want to call a Macro called FAS_UNhide. If E4 has ANY OTHER
VALUE (using a simple IF I can make this other value a NO), then I
want it to run another MACRO (called FAS_hide)

Using the Code as reflected below nothing happens UNTIL I MANUALLY GO
INTO CELL (E4) and press F2(ie function key 2). I need the event to run
when the cell contents are changed.... - NOW I THINK THE PROBLEM IS
BECAUSE I NEED TO USE THE worksheet_calculate event handler - BUT I
DONT KNOW HOW TO..... WHAT NEEDS changin BELOW...?
I would greatly appreciate any help


Attached code

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Sheets("Answers").Select

If Target.Address = "$E$4" Then
Application.EnableEvents = False
If Target.Value = "No" Then
Call FAS_Hide
End If

If Target.Value = "FAS" Then
Call FAS_Unhide

Application.EnableEvents = True
End If
End If
End Sub


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Help with worksheet event NZuser Excel Worksheet Functions 6 April 20th 09 11:01 AM
Excel VBA - Need help with a _calculate event converse Excel Programming 1 August 6th 04 07:28 AM
Event Procedures: Event on Worksheet to fire Event on another Worksheet Kathryn Excel Programming 2 April 7th 04 07:35 PM
Copying Worksheet triggers Click event of combobox on another worksheet Robert[_20_] Excel Programming 0 January 23rd 04 07:40 PM
macro to apply worksheet event to active worksheet Paul Simon[_2_] Excel Programming 3 August 7th 03 02:50 AM


All times are GMT +1. The time now is 06:15 PM.

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

About Us

"It's about Microsoft Excel"