Avatar of mjfigur
mjfigur
 asked on

VBA Macro Excel 2007 and Refresh All External Data and Save

I am very new to working with coding VBA and have spent the last few hours trying to achieve exactly what I need.

Basically have an excel file with three workbooks (all pivot tables) and linked to an Oracle Database. I have already scheduled the automation on the Oracle side but need to have some way of automating the refresh all of the data by opening excel.

I have read that there is an open worksheet function that will run the code every time it is opened, however that will not work exactly right as I want the refresh to only occur if windows task scheduler is the one that opens the file. (That way the refresh will not be seen by end users whom are using the reports) Once the refresh is complete just need to be able to direct it to a place to save and possibly zip.

Thanks for your help in advance.
Visual Basic ClassicMicrosoft ExcelVB Script

Avatar of undefined
Last Comment
VipulKadia

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
VipulKadia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes