View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default how to trigger macro or force autofit

Use the change event to run your macro.

Right click on the worksheet tab and select view code.

in the left dropdown select Worksheet and in the Right, Change, (not
SelectionChange). This will put in the declaration for the change event and
you can call you macro here. The target arguments specify the Cell or
cells that were edited and triggered the event.

--
Regards,
Tom Ogilvy

"lcoreyl" wrote in message
...
Is it possible to trigger a macro by changing a particular cell?

More specifically, I am running a cell height format macro, and it
would be nice if it would automatically run whenever a cell change was
made.

another solution would be if anyone knows how to make row height
autofit work on merged cells. I don't understand why it doesn't...



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/