Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cindy B
 
Posts: n/a
Default Running macros automatically-AutoFit

I've used Jim Rech's autofit macro for merged cells. It works great. Thanks!

Seems I have to use alt-f8 to run the macro and make the merged cells
autofit everytime I make a change (add text). Is there a way to make it work
automatically, perhaps so that the macro is "always running"?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Anne Troy
 
Posts: n/a
Default Running macros automatically-AutoFit

What you want is to run the macro on a worksheet change event. To do that,
make sure the macro code is in the worksheet (Right-click the sheet and hit
View Code and paste it into the code window there, if it's not already).
Then, rename the macro so that it's called Private Sub
Worksheet_Change(ByVal Target As Range)
(or you can create a NEW macro with this name and call the other macro from
it.
I am not sure this will work perfectly for you, but will definitely give you
a place to start.
************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Cindy B" wrote in message
...
I've used Jim Rech's autofit macro for merged cells. It works great.
Thanks!

Seems I have to use alt-f8 to run the macro and make the merged cells
autofit everytime I make a change (add text). Is there a way to make it
work
automatically, perhaps so that the macro is "always running"?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open workbook automatically Jo Coen Excel Discussion (Misc queries) 2 July 29th 05 11:57 AM
Running a Macro automatically from Excel Brakeshoe Excel Worksheet Functions 1 July 13th 05 11:23 PM
Running macros when Excel starts up Solly Excel Discussion (Misc queries) 1 July 13th 05 11:38 AM
Opening a file and enabling macros automatically Fernandoalberte Excel Discussion (Misc queries) 1 June 29th 05 12:31 PM
HELP - Running Macros in VBA Louise New Users to Excel 7 April 6th 05 03:21 PM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"