ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA - msgbox of excel regarding Update (https://www.excelbanter.com/excel-programming/293761-excel-vba-msgbox-excel-regarding-update.html)

pando

Excel VBA - msgbox of excel regarding Update
 
Hello All,

i wrote a macro that opens an excel file and does

ActiveWorkbook.RefreshAll

the file has a queries link directly to an sql data base via ODBC
and others that are pivot link to the server DB .

when i run the code i get the following msgbox from Excel.

THis action will cancel a pending refresh data command continue?

what should i do to to continue update the file ???.


attached please find the print screen of excel

here is the code i wrote :

sub macro1

ChDir "C:\Documents and Settings\amid\Desktop\Copy o
Reporting\Other\SalesInfo"
Workbooks.Open Filename:= _
"C:\Documents and Settings\amid\Desktop\Copy o
Reporting\Other\SalesInfo\Results_other.xls"
Call Refreshing
Range("j22").Value = "other " & " Updated"
End Sub

Sub Refreshing()


ActiveWorkbook.RefreshAll
ActiveWorkbook.Save
ActiveWorkbook.Close

End Su

Attachment filename: updatemsg.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=49766
--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com