![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Location: Leeds UK
Posts: 3
|
is it possible to assign the position at which the mouse left button is pressed to two variables (x coord,y coord) so that macros can act upon where the mouse is. This would save me having to rewrite macros for different positions
cheers pete |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
What sort of macros are you running? i.e. what difference does it make as to where the mouse is clicked?
Your original request sounds sort of doable, unfortunately I will not have proper access to Excel until Sunday/Monday. |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Some of the worksheet functions you can use are: =CELL("ADDRESS") .... to get the cell's row and column designators =CELL("COL") ... to get the column number =CELL("ROW") ... to get the row number of the active cell Regards! |
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
the long way of doing something. What exactly are you trying to do. See Yogis post.....as left clicking just gives you the equavalent of selecting a cell and there is other coding within Excel to give you what you require. Otherwise you will have to resort to APIs when it may not be required. |
|
|
|
|
|
|
#5 |
|
New Member
Join Date: May 2002
Location: Leeds UK
Posts: 3
|
i want (for example) a macro that will change (for example) the background colour of the cell over which it is positioned. At the moment I have to edit the macro every time i want to use it over a new cell I can e-mail an example if you contact me at pete_akroyde@hotmail.com
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|