![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com