run macro on workbook open

K

kevin

Hi,

I have a macro that sorts a table. what do i need to do to have this macro
run every time the workbook is opened? is it simply run XYZ() under the
object this workbook?
 
K

Kassie

type in Workbookopen and click on search said:
Hi,

I have a macro that sorts a table. what do i need to do to have this macro
run every time the workbook is opened? is it simply run XYZ() under the
object this workbook?
 
K

Kassie

and then do the typing said:
Hi,

I have a macro that sorts a table. what do i need to do to have this macro
run every time the workbook is opened? is it simply run XYZ() under the
object this workbook?
 
H

Harald Staff

Almost:

Private Sub Workbook_Open()
Call XYZ
End Sub

in the ThisWorkbook module

HTH. Best wishes Harald
 
Top