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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to the Board!

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

Hope that helps,

Smitty
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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
Back
Top