Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default how to activate macro from cell

Can I activate macros from cell by clicking it??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default how to activate macro from cell

Hi,

You could do this. Right click your sheet tab, view code and paste this in
and then try selecting A1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
MyMacro
End If
End Sub

Sub MyMacro()
MsgBox "You Did it"
End Sub

Mike

"artzuka" wrote:

Can I activate macros from cell by clicking it??

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default how to activate macro from cell

Thanks, It works well...

"Mike H" kirjoitti:

Hi,

You could do this. Right click your sheet tab, view code and paste this in
and then try selecting A1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
MyMacro
End If
End Sub

Sub MyMacro()
MsgBox "You Did it"
End Sub

Mike

"artzuka" wrote:

Can I activate macros from cell by clicking it??

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
activate macro Jase Excel Discussion (Misc queries) 1 June 9th 08 08:25 PM
button in a cell to activate a macro alexfair Excel Worksheet Functions 6 May 30th 08 03:09 PM
activate macro only in sheet2 Narkom Excel Worksheet Functions 3 March 20th 06 09:21 PM
activate a cell value through a macro TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 10th 05 08:48 AM
Ways to activate a macro eddied Excel Discussion (Misc queries) 2 February 7th 05 07:00 AM


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