MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How to answer a ? in VBA

Posted by Marcie on August 17, 2001 8:06 AM

I currently have an automated process running that updates multiple workbooks (VBA Code) with the data from a master workbook. My user has made a change and now one of the workbooks to be updated comes up with a question (on open) "the workbook you opened contains automatic links to info in other workbooks..." Then it has a Yes or No prompt. Is there any way to handl this in the VBA code? I want to automatically answer "NO" to the question and not have my automated program stop when it comes to this workbook as it does now.

Posted by neo on August 17, 2001 8:47 AM

have you tried...?

application.displayalerts = false

before the code that opens the book causing the update links dialog box?


Posted by Marcie on August 17, 2001 9:15 AM

Re: have you tried...?

Well... I found something similar. I found the code: application.AskToUpdateLinks=False, but this will only get rid of the message. I guess what I'm looking for is a way to answer "YES", rather than get rid of the question alltogether.

Posted by Rosty on August 17, 2001 4:08 PM

Excusame but I donĀ“t speak English very good.

You can try open file with "UpdateLinks:=0"


Workbooks.Open Filename:="C:\TABLAS.XLS", UpdateLinks:=0