Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro after value change from drop down list


Hi

I have read several related threads but can't find the answer.

I want to trigger a macro when I select a value from a scroll down list
in a cell.

Let's say A1 has a validation list of 5 numbers:

1
2
3
4
5

When I select a value from the scroll down list it will not trigger the
macro to run. If I double click on the cell *after* I have selected from
the drop-down list, and *then* hit enter, the macro will run.


Code:
--------------------

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Not IsEmpty(Target) Then
Macro1
End If
End If
End Sub

--------------------



But that sort of defeats the point of using the scroll down list.

Any ideas would be appreciated.
Thanks

tx

btw, I have had some trouble with the search function for this board.
anybody else having the same trouble?


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519577

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro after value change from drop down list


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.Run "Book1!Macro1"
End If
End Sub


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=519577

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro after value change from drop down list


Looks like the " " marks made the difference. Thanks. Works great!


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519577

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
How do I change a drop down list? ErinOakes Excel Discussion (Misc queries) 1 January 25th 10 04:36 PM
Recording a macro to change item selected in drop down list Jen Excel Worksheet Functions 2 October 2nd 08 11:37 PM
How to link macro to change an item in drop-down list Amotif Excel Discussion (Misc queries) 1 May 7th 08 01:55 PM
change info in other cells when i change a number in a drop list? macbr549 Excel Discussion (Misc queries) 2 September 11th 05 02:07 AM
change by value in drop down list choice[_2_] Excel Programming 5 April 9th 05 06:07 PM


All times are GMT +1. The time now is 06:45 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"