ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autorefreshing excell external data while opening from VBA code (https://www.excelbanter.com/excel-programming/287031-autorefreshing-excell-external-data-while-opening-vba-code.html)

Devendra[_2_]

Autorefreshing excell external data while opening from VBA code
 
Hi Everybody,

I've created a Excel sheet with a external data link.. Now, I want to
open this excell sheet from VBA code and do some calculation on the
latest data, but, the problem is that the data doesn't gets updated
while I open the sheet from VBA code. [Note: I've selected the option
to update external data as soon as the sheet opens and its working if
I open the sheet normally i.e not from VBA code]

Thanks in advance,
Devendra

Rob van Gelder[_4_]

Autorefreshing excell external data while opening from VBA code
 
Devendra,

Does ThisWorkbook.RefreshAll work?

Rob


"Devendra" wrote in message
om...
Hi Everybody,

I've created a Excel sheet with a external data link.. Now, I want to
open this excell sheet from VBA code and do some calculation on the
latest data, but, the problem is that the data doesn't gets updated
while I open the sheet from VBA code. [Note: I've selected the option
to update external data as soon as the sheet opens and its working if
I open the sheet normally i.e not from VBA code]

Thanks in advance,
Devendra





All times are GMT +1. The time now is 10:43 AM.

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