LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
beauty_bobaloo
 
Posts: n/a
Default run macro when cell is selected

I have been trying to figure this out for hours now.

I just want to run a macro when a certain cell is selected.
upon investigation, i have found that I can right click on the sheet tab and
view the code. I can then add the following code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$a$1" Then
run(macro1)
end if
End Sub

I know that this doesn't work, but I can't figure out how to get it to work.
Any help will be greatly appreciated.

thanks in advance

Melissa
 
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
Running a macro in a selected cell... Steve Excel Discussion (Misc queries) 2 January 19th 06 10:58 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
move to another cell within a subtotal report within a macro NoelH Excel Worksheet Functions 1 August 31st 05 03:02 PM
in cell editing macro ynissel Excel Discussion (Misc queries) 2 July 27th 05 07:28 PM
Relative Cell position NOT working with or without macro Scratching my Head Excel Discussion (Misc queries) 6 May 30th 05 06:12 PM


All times are GMT +1. The time now is 04:55 PM.

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"