LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default Run Macro on Mouse Click

On Thu, 13 Jul 2006 10:58:02 -0700, vacation
wrote:

Is is possible to run a macro that displays a pre-set number upon clicking in
a cell?
For example: everytime someone needs to see the value 24 in cell b4 all they
have to do is click in that cell to make that number visible.
Thank you


The following in the Worksheet Selection Change event should do the
trick


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B4")) Is Nothing Then Range("B4")
="24"

End Sub

HTH

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
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
Run macro on double click only famdamly Excel Discussion (Misc queries) 2 February 27th 06 12:15 PM
I click on something and my Macro buttons disappered. Help. Colleen New Users to Excel 5 December 19th 05 06:06 PM
adding macro to right mouse click menu JimB Excel Discussion (Misc queries) 1 October 31st 05 03:37 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Mouse right click problem Anthony Excel Discussion (Misc queries) 1 June 30th 05 12:54 AM


All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"