PC Review


Reply
Thread Tools Rate Thread

change event for drop down

 
 
=?Utf-8?B?dmlvbGV0?=
Guest
Posts: n/a
 
      18th Oct 2006
is there anyway that i can execuate a macro whenever the user change the
selection in the drop down instead of the user need to select then click on a
button to execute
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      18th Oct 2006
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 on the sheet tab, select
'the View Code option from the menu, and paste the code in.




--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"violet" <(E-Mail Removed)> wrote in message
news:939BDEB4-71E3-429E-8D60-(E-Mail Removed)...
> is there anyway that i can execuate a macro whenever the user change the
> selection in the drop down instead of the user need to select then click

on a
> button to execute



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down change event Kristen Microsoft Excel Programming 7 7th Feb 2008 08:40 PM
Change event due to Cut & Paste, Drag & Drop or Edit cjakeman Microsoft Excel Programming 0 28th Jul 2006 07:16 PM
Change event due to Cut & Paste, Drag & Drop or Edit cjakeman Microsoft Excel Programming 4 28th May 2006 09:19 AM
Redirect fired when drop downlist change event occurs =?Utf-8?B?TWFya3VzIE1jR2Vl?= Microsoft ASP .NET 7 24th Nov 2004 03:41 PM
drop down list change event =?Utf-8?B?cm9kY2hhcg==?= Microsoft VB .NET 4 6th Oct 2004 09:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:24 PM.