Anyway to automatically update from a shared workbook?

wageslave101

Board Regular
Joined
Jul 18, 2007
Messages
154
Hi I'm new here so I apologise if this a newbie question :)

I would like a workbook to automatically update from another book at the moment I've a button in a sheet that when selected does

Code:
Sub TLRefresh()
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    Windows("TeamData.xls").Activate
    ActiveWindow.Close
    Workbooks.Open Filename:="TeamData.xls"
    Windows("TLRecord.xls").Activate
    ActiveWindow.WindowState = xlMaximized
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
End Sub

The problem I'm encountering is that the TeamData.xls is a Shared Workbook and when I run the macro I get a message box

"This workbook contains links to other data sources..."

At which point it pauses waiting for a user to select Update or Don't Upate.

I would like this to select Update without any user intervention - is this possible?

Sincerely,
WageSlave101
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

You can goto Tools-->Options-->Edit-->Uncheck "Ask to update automatic links".

Hope that helps,

Smitty
 

wageslave101

Board Regular
Joined
Jul 18, 2007
Messages
154
Thank you very much mate :)

I just added in a;

Code:
Application.AskToUpdateLinks = False
.
Application.AskToUpdateLinks = True

Around it and that worked a charm.

Thank you very much again for your help :)

Cheers,
WageSlave101
 

Forum statistics

Threads
1,181,649
Messages
5,931,214
Members
436,784
Latest member
amuljono

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top