Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activating macro on mouseclick
I have been trying to set up a macro which will run when I click on a
cell, to change the value in another cell. I have tried a number of variations around the following around Private Sub Worksheet_SelectionChange(ByVal target As Range), but I'm getting an error saying "Ambiguous name detected: Worksheet_SelectionChange". All I want to do is run macro that checks the value of the clicked cell and update another cell if appropriate. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activating macro on mouseclick
Where did you put the macro? The message you are getting is because it can't
find the "right" version of the macro to run. Your code needs to be in the module for the worksheet; i.e. in the VBA editor show the Project Explorer and double-click on the line for the worksheet you are using. If you have used the macro name Worksheet_SelectionChange in another module you added, that might be why it is getting an "Ambiguous Name" since when you call the macro it can't tell which one to run - the one for the sheet or the one in the module. -- - K Dales "Hmmm" wrote: I have been trying to set up a macro which will run when I click on a cell, to change the value in another cell. I have tried a number of variations around the following around Private Sub Worksheet_SelectionChange(ByVal target As Range), but I'm getting an error saying "Ambiguous name detected: Worksheet_SelectionChange". All I want to do is run macro that checks the value of the clicked cell and update another cell if appropriate. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Activating macro on enter. | Excel Worksheet Functions | |||
Activating a Macro | New Users to Excel | |||
Circular reference after mouseclick | Excel Programming | |||
mouseclick events | Excel Programming | |||
API's and Mouseclick | Excel Programming |