
|
Book Home Page Bloglines 1906 CelebrateStadium 2006 OfficeZealot Scobleizer TechRepublic AskWoody SpyJournal Computers Software Microsoft Windows Excel FrontPage PowerPoint Outlook Word Host your Web site with PureHost! |
Saturday, July 19, 2008 – Permalink – Run a Macro from CellHow to do the impossible (almost)There are times when it might be nice to run a macro from a cell function. Something like : if a cell has a certain value, a macro will run: =IF(A1>10,Macro1) You can not initiate a macro from a worksheet cell function. However, you can use the worksheet's Change event to do something like this:
Also see: After posting this, Ross Mclean of Methodsinexcel.co.uk came up with a great work around using a User Defined Function. You can see the simple coding here: Running a macro from a cell. Public Function RMAC _ when invoked by this worksheet formula: =rmac("MyMacro","yada")runs the sub MyMacro with some modification. The Beep is executed, the cell color change is not. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ See all Topics excel <Doug Klippert@ 2:09 AM
Comments:
Post a Comment
|