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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -