how to trigger macro or force autofit

L

lcoreyl

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...
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top