[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

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?
0
lrbrister
Asked:
lrbrister
1 Solution
 
Rory ArchibaldCommented:
Right-click the querytable, choose Data Range Properties and check the option to refresh on Workbook open.
Regards,
Rory
0
 
gjutrasCommented:
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.
0
 
gtglonerCommented:
Try this code in your ThisWorkbook VBA environment window:

Private Sub Workbook_Open()

 ActiveSheet.RefreshData

End Sub
0
 
lrbristerAuthor Commented:
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!
0
 
Rory ArchibaldCommented:
Glad to help - thanks for the grade.
Rory
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now