Need to skip warning

M

March

Hello All,

I don't know how to write VBA to skip the warning pop-up in Access.

I have one file in Excel. The file is link to Access.

I want to skip the pop-up that says

"Microsoft Excel

This workbook contains links to other data sources

-to update all linked info, click yes

-to keep the existing info, click no"


For the link, I have to keep it updates all time.


I want to make it automated update through the excel file.


Please give me suggestion.


Thank you,


March
 
R

Rick Rothstein \(MVP - VB\)

I don't know if this will work for what you are doing or not, but try
putting this statement..

Application.DisplayAlerts = False

beforehand and set it back to True afterwards.

Rick
 
R

Rick Rothstein \(MVP - VB\)

I've never worked with Access before (via a link or otherwise), so I am only
guessing here, but I would think if turning off display alerts would work at
all, you would put in in your Excel code.

Rick
 
M

March

i try to put it

like this below




Sub Workbook_Open()

Application.DisplayAlerts = False

End Sub


It doesn't work fro what I want it to be.

I wrote vba in Access. Excel in one small part in the code to get refreshing
new data.

I try to set excel workbook itself by

Menu bar : Edit -->Links-->Startup Prompt
I selected "Don't display the alert and update links"


These didn't work. Hmmmm.... It work in my other workbooks. And these make
me don't know what should I continue to do.
 
R

Ron de Bruin

In the workbook open argument there is argument named updatelinks

Example:

Set mybook = Workbooks.Open(MyPath & MyFiles(Fnum), _
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"
Use 3 instead of 0 if you want to update the links.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top