hi there,
i do possess a dashboard workbook in which contains pivot tables and charts. All of them are through external data connections. But, some are refreshing and some are not....Posting here the code....Also, sendkeys function is not working...Please help....i nearly tries everything and wasted hours....
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.RefreshAll
Workbooks.Open Filename:="C:\Users\RadheRadhe\Desktop\Javak & Hopper.xlsm", Password:="crushergrit"
Application.Wait Now + TimeValue("00:00:02")
Workbooks.Open Filename:="C:\Users\RadheRadhe\OneDrive\Dashboard.xlsx"
Interaction.SendKeys "^%{F5}"
ActiveWorkbook.RefreshAll
Interaction.SendKeys ("^%{F5}")
Application.Wait Now + TimeValue("00:00:05")
Workbooks("Javak & Hopper.xlsm").Save
Workbooks("Javak & Hopper.xlsm").Close
Workbooks("Dashboard.xlsx").Save
Workbooks("Dashboard.xlsx").Close
ActiveWorkbook.Save
End Sub
Private Sub Workbook_Open()
Call expbarrel
Call expoil
End Sub
Bookmarks