Debugger brings me to this line below in red. My file activityreportdatabase.xlsx is in the correct location and is not opened. I can manually update link with this file but it goes to the debugger when I do it with this script. The cursor in the debug window in on the line with "xlExcelLinks"Any clues?
Sub GetLinks()
'
' UpdateLinks Macro
Dim Response As Integer, PASSWORD As String
Response = MsgBox(prompt:="UPDATE NOW?", Buttons:=vbYesNo)
If Response = vbYes Then
ActiveSheet.Unprotect ("456")
ActiveWorkbook.UpdateLink Name:="C:\activityreportdatabase.xlsx", Type:= _
xlExcelLinks
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.Protect ("456")
Else
End If
End Sub
Sub GetLinks()
'
' UpdateLinks Macro
Dim Response As Integer, PASSWORD As String
Response = MsgBox(prompt:="UPDATE NOW?", Buttons:=vbYesNo)
If Response = vbYes Then
ActiveSheet.Unprotect ("456")
ActiveWorkbook.UpdateLink Name:="C:\activityreportdatabase.xlsx", Type:= _
xlExcelLinks
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.Protect ("456")
Else
End If
End Sub