Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / May 2007

Tip: Looking for answers? Try searching our database.

Can I set up a macro to run when a click a moninated cell  ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam - 19 May 2007 07:34 GMT
I want to set up a macro in a worksheet to run when I click a cetain cell in
a worksheet rather than going to tools,macro,macros,clicking on the macro
name & run.
houghi - 19 May 2007 09:01 GMT
> I want to set up a macro in a worksheet to run when I click a cetain cell in
> a worksheet rather than going to tools,macro,macros,clicking on the macro
> name & run.

Use a button. http://www.mrexcel.com/tip068.shtml

What I do for some things that need to be used by others is first have
one sheet with the button(s) and the cell(s) that need changing. Have an
explanation next to the cells and button and a generic information on
the sheet.
Next secure the file, so only certain cells can have data.
Then selct white as colour, so the grey lines are gone.
Put a company logo on there to impress management and it looks as if it
is something realy complicated and good. :-D

That way people who are not the into the details of what it does behind
the scenes still are able to use it easily.

houghi
Signature

Please go to : http://tinyurl.com/aqe6y (Google site)
and vote for 'Default quoting of previous message in replies'

> This was a broadcast from the netpolice.
JLatham - 20 May 2007 03:06 GMT
Sam, there are a couple of easier ways to do it than picking on a particular
cell to activate the macro.  If you just use a cell you have to then add code
to some worksheet event such as _SelectionChange or _OnDoubleClick to detect
and test which cell got selected/clicked in and then decide which macro to
run based on that test.

You can use buttons from the Forms icon toolbar (View | Toolbars | Forms) to
do the same thing easier - you put the button on a sheet and put appropriate
text in it to tell what it does.  You can then right-click on it and [Assign
macro] and choose an existing macro to be run when you click on it, or you
can build a new macro associated with it that will be named something like
Button01_Click().

You can even get more creative by using shapes and text boxes from the
Drawing toolbar (again: View | Toolbars | Drawing) and you can pretty them up
with color and with the TextBox you can do some fancier things with the text
in them.  You can then right-click and do the Assign Macro thing with them
also.

You can pretty much [Assign Macro] to anything you can put onto a sheet or
form in Excel - even pictures!

> I want to set up a macro in a worksheet to run when I click a cetain cell in
> a worksheet rather than going to tools,macro,macros,clicking on the macro
> name & run.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.