Larry Brister
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?
Is there any way I can get the data to refresh on the file opening?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Private Sub Workbook_Open()
ActiveSheet.RefreshData
End Sub
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!
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
Rory