J
John Cole, Jr.
I posted a similar request with no request. I'm hoping someone has
seen this problem and has a way to fix it. I have a spreadsheet that
I'm opening that contains a workbook_open routine as well as Links to
external workbooks. I have turned off the AskForLinkUpdates.
However, I still get the dialog that states some of the links could
not be updated. It gives me teh option to choose "Continue" or "Edit
Links". If I choose "Continue", the routine runs normally, and I
don't have any issues. If I choose "Edit Links", it stops the
routine. How can I make Excel continue on the macro no matter what is
chosen? I've attached my code for reference.
Private Sub Workbook_Open()
'Place in ThisWorkbook of all Excel Supports
MsgBox ("You Must Press Continue on the following Prompt.")
Application.AskToUpdateLinks = False
Application.DisplayAlerts = False
'Install AddIn
On Error GoTo addInError
Application.AddIns.Add Filename:=APPFullPathName, CopyFile:=False
Application.AddIns(APPNAME).Installed = True
On Error GoTo 0
'Open DataBook
On Error GoTo DataBookError
Dim moduleLineList As Object
Set moduleLineList = GetObject(DataBookFullName)
On Error GoTo 0
'Reset Links
ThisWorkbook.Activate
ChDir APPPath
ActiveWorkbook.ChangeLink Name:=APPFileName, NewName:=APPFileName,
Type:= _
xlExcelLinks
Application.AskToUpdateLinks = False
'Reset Application Variables
ActiveWindow.Visible = True
Application.DisplayAlerts = True
'exit
Exit Sub
'Error Handling
addInError:
MsgBox ("The " & APPNAME & " AddIn isn't in the correct directory, or
it isn't named correctly." & vbCr & _
"Place it in the directory as follows and re-open this Support
File." & vbCr & APPFullPathName)
GoTo ExitAfterErrorMsg
DataBookError:
MsgBox ("The " & DataBook & " file could not be found in teh correct
directory, or it isn't named correctly." & vbCr & _
"Place it in the directory as follows and re-open this Support
File." & vbCr & DataBookFullName)
GoTo ExitAfterErrorMsg
ExitAfterErrorMsg:
ThisWorkbook.Close
Application.DisplayAlerts = True
Application.AskToUpdateLinks = False
Exit Sub
End Sub
seen this problem and has a way to fix it. I have a spreadsheet that
I'm opening that contains a workbook_open routine as well as Links to
external workbooks. I have turned off the AskForLinkUpdates.
However, I still get the dialog that states some of the links could
not be updated. It gives me teh option to choose "Continue" or "Edit
Links". If I choose "Continue", the routine runs normally, and I
don't have any issues. If I choose "Edit Links", it stops the
routine. How can I make Excel continue on the macro no matter what is
chosen? I've attached my code for reference.
Private Sub Workbook_Open()
'Place in ThisWorkbook of all Excel Supports
MsgBox ("You Must Press Continue on the following Prompt.")
Application.AskToUpdateLinks = False
Application.DisplayAlerts = False
'Install AddIn
On Error GoTo addInError
Application.AddIns.Add Filename:=APPFullPathName, CopyFile:=False
Application.AddIns(APPNAME).Installed = True
On Error GoTo 0
'Open DataBook
On Error GoTo DataBookError
Dim moduleLineList As Object
Set moduleLineList = GetObject(DataBookFullName)
On Error GoTo 0
'Reset Links
ThisWorkbook.Activate
ChDir APPPath
ActiveWorkbook.ChangeLink Name:=APPFileName, NewName:=APPFileName,
Type:= _
xlExcelLinks
Application.AskToUpdateLinks = False
'Reset Application Variables
ActiveWindow.Visible = True
Application.DisplayAlerts = True
'exit
Exit Sub
'Error Handling
addInError:
MsgBox ("The " & APPNAME & " AddIn isn't in the correct directory, or
it isn't named correctly." & vbCr & _
"Place it in the directory as follows and re-open this Support
File." & vbCr & APPFullPathName)
GoTo ExitAfterErrorMsg
DataBookError:
MsgBox ("The " & DataBook & " file could not be found in teh correct
directory, or it isn't named correctly." & vbCr & _
"Place it in the directory as follows and re-open this Support
File." & vbCr & DataBookFullName)
GoTo ExitAfterErrorMsg
ExitAfterErrorMsg:
ThisWorkbook.Close
Application.DisplayAlerts = True
Application.AskToUpdateLinks = False
Exit Sub
End Sub