Discussion Locked

VBA for Excel 97 - Macro for Linking

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have created several order forms that my company uses for our salesreps. They all link to an account database for autofill.
Everytime a rep opens the form, the dialog box "To Update all links, click yes, To keep existing info, click no", appears. How can I write a macro that runs when the form opens, and automatically says no, without user seeing?
I thought I had it with the line "open filename" updatelinks=false. That works but must be ran from another workbook.
I have tried the above line Using Private Sub Workbook_Open(), macro seems to ignore the line and ask the question anyway.

Remember, It needs to open without asking or updating links.
Thanks.

3 replies

by homer simpson instructor at large

Here's what I used and it worked great. I had it maximize the sheet and turn off the updating.
Private Sub workbook_open()
Application.WindowState = xlMaximized
Application.AskToUpdateLinks = False

End Sub

by rvs

I have tried your approach. Actually what the above does is "automatically update links" in Excel. Like going to tools/options/ then deselecting ask to update links.
The file opens and automatically updates the links.

I want to avoid the delay of updating these forms. That is why I'm looking for some code that answers no to the question, not code that answers yes without the user seeing.

Thanks

This discussion is closed to new replies.