ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Update / don't update dialog box (https://www.excelbanter.com/excel-worksheet-functions/6226-update-dont-update-dialog-box.html)

Tim Kredlo

Update / don't update dialog box
 
I have a workbook (WB01) that contains a macro to open a second workbook
(WB02). WB01 has links to WB02, so when WB01 is opened, the 'This workbook
contains links to other data sources' dialog box is presented.

How can I code my WB01 Workbook_Open() subprocedure to suppress this dialog
box?

Ron de Bruin

Hi Tim

Set mybook = Workbooks.Open(FNames, Password:="ron", WriteResPassword:="ron", UpdateLinks:=0)

If your workbooks are protected you can us this in the Workbooks.Open arguments
Password:="ron" and WriteResPassword:="ron"

If you have links in your workbook this (UpdateLinks:=0) will avoid the message
do you want to update the links or not < 0 Doesn't update any references

See the VBA help for more information about the Workbooks.Open arguments


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Tim Kredlo" <Tim wrote in message ...
I have a workbook (WB01) that contains a macro to open a second workbook
(WB02). WB01 has links to WB02, so when WB01 is opened, the 'This workbook
contains links to other data sources' dialog box is presented.

How can I code my WB01 Workbook_Open() subprocedure to suppress this dialog
box?





All times are GMT +1. The time now is 12:46 PM.

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