View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JDay01 JDay01 is offline
external usenet poster
 
Posts: 5
Default Macro to run when validation choice selected

Works like a charm! Thanks for the help...

"Bob Phillips" wrote:

.... for example

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H10" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
' do your stuff
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"galimi" wrote in message
...
You need to add a change event to the sheet in question and have it react
only to the specific cell that is performing data validation.
--
http://HelpExcel.com




"JDay01" wrote:

Hopefully this is a simple question.... I need to have a macro run
automatically when a user makes their selection from a data validation
drop-down box. The macro name is Hide_Columns. What is the code needed
to
execute this macro upon their selection?