Can anyone help with the below code.
I keep getting an error of "This will cancel a pending data refresh. Continue?" even though all the tables have updated and then when the save happens I am getting a box to ask if I want to save changes. I thought what I had below would just save the changes automatically. I just need this workbook to open, refresh, save and close.
Thanks
Chris
Sub Updatebillingfigures()
'
' Updatebillingfigures Macro
'
'
Workbooks.Open Filename:= _
"\\dellddp91234\Private\Chris\Billing analysis for daily figures.xlsm"
ActiveWorkbook.RefreshAll
DoEvents
Application.Wait (Now + TimeValue("0:01:00"))
ActiveWorkbook.Save
DoEvents
Application.Wait (Now + TimeValue("0:00:45"))
ActiveWindow.Close
End Sub
I keep getting an error of "This will cancel a pending data refresh. Continue?" even though all the tables have updated and then when the save happens I am getting a box to ask if I want to save changes. I thought what I had below would just save the changes automatically. I just need this workbook to open, refresh, save and close.
Thanks
Chris
Sub Updatebillingfigures()
'
' Updatebillingfigures Macro
'
'
Workbooks.Open Filename:= _
"\\dellddp91234\Private\Chris\Billing analysis for daily figures.xlsm"
ActiveWorkbook.RefreshAll
DoEvents
Application.Wait (Now + TimeValue("0:01:00"))
ActiveWorkbook.Save
DoEvents
Application.Wait (Now + TimeValue("0:00:45"))
ActiveWindow.Close
End Sub