1

POP UPI have a code which copied data between files. Some of these files have links to other files. So, when I run my macro to automatically copy data to other files, I get these pop-ups asking me whether I want to update these links. And after selecting "update", I get another pop-up saying that these links cannot be updated and asking me whether I would like to continue. Even while saving the file after copying, I get a pop-up saying "Be careful...." I do not want these pop-ups to appear while running the code. I want it to be fully automatic i.e. without any manual intervention

1
  • 1
    Workbooks.Open filename, UpdateLinks:=False) or True Commented Jun 26, 2019 at 8:37

1 Answer 1

3

Display messages can easily be avoided like so:

Sub test()
Application.DisplayAlerts = False

'Code

Application.DisplayAlerts = True
End Sub

EDIT
To avoid the Update warning:

Sub test()
Application.AskToUpdateLinks = False
Application.DisplayAlerts = False

'Code

Application.AskToUpdateLinks = True
Application.DisplayAlerts = True
End Sub

And in case you're just opening a workbook, this is sufficient:

Application.Workbooks.Open Filename:="C:\test.xlsx", UpdateLinks:=False
Sign up to request clarification or add additional context in comments.

1 Comment

Worked well with two pop-ups. Still, get one. See my edit to view the image of the pop-up

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.