Application.DisplayAlerts problem

craigexcel

Active Member
Joined
Jun 28, 2006
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
Previously the setting of "Application.DisplayAlerts = False" was working fine when my code used a specific reference to open the target workbook:

Workbooks.Open Filename:= _
"Z:\Finance\Monthend Files\2007 Actual\2007 Flash\" & FLASH_workbook & ".xls" _
, UpdateLinks:=0

However, I changed the code to open the target workbook, by opening a dialog box to allow the user to select the specific workbook from the available files:

Target_FLASH_Path_and_File_name = Application.GetOpenFilename("Excel-files,*.xls", , "Please select the file to open")
Workbooks.Open (Target_FLASH_Path_and_File_name)

Now the prompt to 'update links' (to external sources) appears each time I open the target workbook. Is there a way to modify the code to open the target workbook so the 'update' dialog box is bypassed as it was originally?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi:
Code:
Sub test()
Dim Target_FLASH_Path_and_File_name As String
Target_FLASH_Path_and_File_name = "Book1.xls"

Workbooks.Open Filename:=Target_FLASH_Path_and_File_name, UpdateLinks:=0
End Sub

Don't you just need to add the update links option to your open method in the new routine? Regards.
 
Upvote 0
Alexander,
Thanks for your reply. That worked perfectly! I simply overlooked that detail.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

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