LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default How to Run a Macro from clicking a cell

Hi,
have a number of macros wrtten that are currently activated by buttons on
top of cells.
Here is one such macro:
Sub Printall()
'
' Printall Macro
' Macro recorded 17/09/2009 by User
'

'
Range("A10:CF53").Select
ActiveSheet.PageSetup.PrintArea = "$A$10:$CF$53"
Range("A1").Select
End Sub

How do I use this to now change to just a cell (double-click) activated macro?
Do I enter the sheet name and cell reference somewhere?
Have read the following from an earlier question but frankly don`t follow
it!!! Sorry


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

Thanks
RR1


 
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
Clicking on cell asek71 Excel Discussion (Misc queries) 2 August 1st 08 06:43 PM
Run a macro when clicking a cell. [email protected] Excel Worksheet Functions 9 May 7th 08 08:58 AM
Run a macro after clicking into cell Esradekan Excel Worksheet Functions 6 March 27th 08 10:34 PM
Using Macro to sort without clicking on macro button dd Excel Discussion (Misc queries) 3 May 3rd 07 06:00 PM
Run macro from clicking on a cell jrd269 Excel Discussion (Misc queries) 2 June 3rd 05 09:35 PM


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