View Single Post
 
Old 10-04-2010, 03:18 PM
Kimberly Kimberly is offline Windows 7 Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

If you already have a macro that works, but just need for it to run when the file is opened, change the first line of the macro to

Sub Auto_Open()

Instead of Sub Whatever it is currently named

Alternatively, turn on macro recorder and make sure the Use Relative References button is off (it probably is). Name the macro Macro99. Select a cell in column C. Click either sort ascending or sort descending on the toolbar. Stop recording.

Tools > Macro > View macros
Select Macro99 and click Edit button
Change the first line, which is currently Sub Macro99()
to
Sub Auto_Open()
Reply With Quote