Macro, auto refresh data

G

Guest

How can I write a VBA macro so it can refresh data anytime
when the excel book is opened?

Thanks
Daniel
 
K

KLZA

How can I write a VBA macro so it can refresh data anytime
when the excel book is opened?

Thanks
Daniel

Record a Macro and do your refresh thing. In VB, rename the macro to
Auto Start... It should look something like this..

Sub Auto_Start()
ActiveWorkbook.RefreshAll
End Sub
 
K

KLZA

Record a Macro and do your refresh thing. In VB, rename the macro to
Auto Start... It should look something like this..

Sub Auto_Start()
ActiveWorkbook.RefreshAll
End Sub

yikes! It's auto_open not auto_start

Record a Macro and do your refresh thing. In VB, rename the macro to
Auto Start... It should look something like this..

Sub Auto_Open()
ActiveWorkbook.RefreshAll
End Sub
 
G

Guest

Private Sub Workbook_Open()
me.RefreshAll
End Sub

placed in the thisworkbook module of your workbook.
 

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