Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Excel 2005 Datasource

I have an Excel 2003 file with a SQL Server Datasource feeding the data.

Is there any way I can get the data to refresh on the file opening?
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gjutras
gjutras

record a macro of the data refresh and save it with the name Workbook_Open in the workbook object(This Workbook) or edit it and move it to the workbook object. Then when you open the workbook this macro will run.
Try this code in your ThisWorkbook VBA environment window:

Private Sub Workbook_Open()

 ActiveSheet.RefreshData

End Sub
Avatar of Larry Brister

ASKER

rorya:
  I cannot believe that I didn't follow the first rule of Microsoft.  When in doubt right-click.

Points being awarded now.  Great job...and first too!
Glad to help - thanks for the grade.
Rory