Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On-Open Macro in Excel 2000 1

Status
Not open for further replies.

BRIANVH

MIS
Oct 7, 2002
20
0
0
US
I'm working on an Excel Template that gets external data via an ODBC query. That part is working fine. I'm trying to make the template refresh the ODBC data (run the query) automatically when the Excel file is first opened. I am thinking I need an Excel macro that is set up to run when the Excel file is opened. I can record a macro and open it for editing in MS Visual Basic, but beyond that, I know nothing about MS Visual Basic (I may need a bit of detailed help editing the macro script). Thanks in advance for any help.
 



Hi,

No need for a macro.

Select the QueryTable on the sheet.

Data > Impoert External Data > Data Range Properties and select a sutiable Refresh control option.

Skip,
[sub]
[glasses]Did you hear what happened when the OO programmer lost his library?...
He's now living in OBJECT poverty![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top