Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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
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
Activating macro on enter. Priya Gautam Excel Worksheet Functions 2 June 3rd 08 01:43 PM
Activating a Macro d_kight New Users to Excel 5 June 30th 06 07:46 PM
Circular reference after mouseclick Mark ten berge Excel Programming 2 October 5th 05 12:16 PM
mouseclick events animal1881[_4_] Excel Programming 1 August 18th 04 05:55 PM
API's and Mouseclick Dave Peterson[_3_] Excel Programming 2 August 14th 03 03:00 AM


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