I have searched the posts and there really is not an answer. I have the following macro and it works fine. However, I get the pop-up box asking me if I want to update links on the opening workbook. I know about disabling the links box on open through the tools menu. I do not have control of the files that the macro is opening (notice the date wildcard), therefore I cannot go in everytime and reset this tool - plus it would just be easier to click "do not update". I need a code that will disable or automatically tell it NOT to update on open and open the workbook without stopping at that box.
Any suggestions would be greatly appriciated.
Sub open_workbook()
With MyFile
.ScreenUpdating = False
.DisplayAlerts = False
.EnableEvents = False
End With
'-------------------
Dim MyFile As String
Dim MyDate As Date
Dim LatestDate As Date
Dim LatestName As String
'--------------------
MyFile = Dir("U:\Final Budget*.xls")
While MyFile <> ""
MyDate = DateValue(FileDateTime(MyFile))
If MyDate > LatestDate Then
LatestDate = MyDate
LatestName = MyFile
End If
MyFile = Dir("U:\Final Budget*.xls")
Wend
MsgBox (LatestName & vbCr & LatestDate)
End Sub
Bookmarks