LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
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?




 
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
E-mail macro - Field Validation tqdinh22 Excel Discussion (Misc queries) 3 August 21st 06 10:11 PM
Start Macro after user selects a choice from a pick list mathew Excel Discussion (Misc queries) 2 August 17th 06 03:28 PM
Running a Macro when a single cell is selected Jerry Wustrack Excel Discussion (Misc queries) 3 January 31st 06 08:27 PM
Perform oiperations relative to initial selected cell scratching my head Excel Discussion (Misc queries) 1 May 30th 05 05:42 PM
Passing selected workbook name and values to a macro simora Excel Worksheet Functions 0 May 25th 05 07:24 PM


All times are GMT +1. The time now is 10:02 AM.

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"