vba - Refresh embedded queries in excel each night automatically. Can this be done? -
it great me, if update of queries, pivot tables, , formulas each morning @ 6 before came work.
i have code got stack overflow updates queries automaticaly.
public sub refresh() 'refresh activeworkbook.refreshall application.ontime alerttime, "refresh" end sub
i know updates queries set @ specific time , pivot tables , formulas. nice if updated cell last time updated correctly check.
thanks guys! appreciate it!
you want launch via .vbs, think. copy , paste code text file (notepad) , when save it, change ".txt" "all files" , save "launchmacros.vbs" (or have you).
set xl = createobject("excel.application") set wb = xl.workbooks.open("c:\path\to\your.xls") xl.run "'your.xls'!macro" wb.close xl.quit
then use windows task scheduler launch .vbs file on computer has access excel file, , awake. if you're unsure how use task scheduler search web, it's common , you'll find lot of resources this.
Comments
Post a Comment