View Single Post
  #1   Report Post  
Gord Dibben
 
Posts: n/a
Default

Rod

Private Sub Worksheet_Activate()
autoexec
End Sub

Right-click on the sheet tab and "View Code".

Copy/paste the above to that module.

Note: autoexec must be available in the workbook, otherwise you have to point
to it.

Private Sub Worksheet_Activate()
Application.Run ("mymacros.xla!autoexec")
End Sub


Gord Dibben Excel MVP

On Wed, 16 Mar 2005 11:23:14 -0800, Rod wrote:

Trevor, you Excel skills are greater than mine. Can you copy paste a
specific example assuming I had a macro named "autoexec"?

Thanks,

Rod

"Trevor Shuttleworth" wrote:

Rod

I think you are looking for:

Private Sub Worksheet_Activate() in the specific worksheet class (code)
module.

For "open" read "activate".

Regards

Trevor


"Rod" wrote in message
...
Does any one know how I can setup a specific worksheet to run a macro only
when that specific worksheet is opened? Note: I do not want this macro to
run for any other worksheet, just this specific one.

Thanks