I'm a bit of a newbie with regards to excel vba, what I want to do is to run a piece of code when a certain cell is clicked(thats it!) , but I can't for the life of me figure it out!!!
you need to use the worksheet_selection_change event
Right click on the worksheet and choose "ViewCode"
Choose "Worksheet" from the dropdown box on the left
The selection change sub will automatically be prepared for you
Within there enter
If target.address(0,0) = "A1" then
'run code
else
end if
but swap A1 to whatever cell ref you are referencing. Rgds
Geoff "Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.