General discussion

Locked

VBA for Excel 97 - Macro for Linking

By rvs ·
VBA for Excel 97 - Macro for Linking
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, Tokeep existing info, click no", appears. How can I write a macro that runs when the form opens, and automatically says no, without user seeing?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VBA for Excel 97 - Macro for Linking

by awilliams3 In reply to VBA for Excel 97 - Macro ...

I see this post has been here for some time.

The way I would recommend navigating around the update links is to use another workbook to open the workbook(s) in question. Execute code in the workbook to open the target workbook with the UpdateLinks argument of the OPEN method set to 0.

Sub openbutdontupdate()
Application.Workbooks.Open FileName:="C:\DATA\TEST.XLS", updatelinks:=0
End Sub

Now you could about implementing such a solution in many ways. You might create a workbook for each existing workbook that the end-user would open instead. Then having code like above in it's auto_open (or workbook_open event) would open the original desired file preventing the update links dialog question and not update links.

Another way might be to use a single workbook that provides a menu (form) to select which file to open, which consolidates the code. You could also create a menu with the workbook, etc.

Many options, it just depends on what fits.

Collapse -

VBA for Excel 97 - Macro for Linking

by rvs In reply to VBA for Excel 97 - Macro ...

I send this form out as it is updated with changes. All the info/code needs to be contained in one file.

Thanks for the suggestion.

Collapse -

VBA for Excel 97 - Macro for Linking

by rvs In reply to VBA for Excel 97 - Macro ...

This question was closed by the author

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums