Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Cedric Dennis
 
Posts: n/a
Default Can I launch macro by a cell click ?

Hi
Can I launch a macro simply by clicking a cell ?
What command would I need to type in the cell ?
Please help if you can.
Thankyou
Cedric
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

You can use this event in the sheet module for Cell A1
It will also run if you select the cell with the arrow keys

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
yourmacro
End If
End Sub

Sub yourmacro()
MsgBox "Hi"
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl



"Cedric Dennis" wrote in message om...
Hi
Can I launch a macro simply by clicking a cell ?
What command would I need to type in the cell ?
Please help if you can.
Thankyou
Cedric



  #3   Report Post  
Don Guillett
 
Posts: n/a
Default

right click sheet tabview codeinsert thissave to suitSAVE

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$1" Then doit
End Sub
Sub doit()
MsgBox "Hi"
End Sub

--
Don Guillett
SalesAid Software

"Cedric Dennis" wrote in message
om...
Hi
Can I launch a macro simply by clicking a cell ?
What command would I need to type in the cell ?
Please help if you can.
Thankyou
Cedric



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
In excel, I seem to be "locked" on a cell and unable to click off. Bubba Junie Excel Discussion (Misc queries) 7 May 1st 06 07:46 AM
macro relative referencing harriet Excel Discussion (Misc queries) 5 February 15th 05 01:40 PM
enter data in cell then run macro automatically R D S Excel Discussion (Misc queries) 2 January 25th 05 10:19 PM
Undoing LINKS in Excel 2000 jayceejay New Users to Excel 3 January 4th 05 05:58 PM
IN EXCEL, WHEN I CLICK ONA SINGLE CELL It HIGHLIGHTS WHOLE Page confused Excel Discussion (Misc queries) 2 December 7th 04 09:41 PM


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

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"