I am trying to refresh an excel sheet using vb .I am using the following code
myPath = "C:Documents and SettingsrvenkataDesktopreport"
strInput = myPath& "Copy of test.xls"
Set objExcel = CreateObject("Excel.Application")
objExcel.DisplayAlerts = FALSE
objExcel.Visible = TRUE
Set objWorkbook = objExcel.Workbooks.Open(strInput)
Problem is that it comes back with a message:-
"This action will cancel a pending refresh data command.
which requires my interverntion.
So i used
For Each Sheet In objWorkbook.Worksheets
For Each pivot In sheet.PivotTables
I found this code in net...I donno abt pivot tables much but I inserted the above code just before Refresh ALL statement..Its
also returning error "Call was rejected by callee" ..I am not using any sql connections ..I am just getting some
tables from a site ..What to do???
How to set BackgroundQuery property to false to all the tables??
Please help..THanks in Advance