breynolds0431
Active Member
- Joined
- Feb 15, 2013
- Messages
- 303
- Office Version
- 365
- 2016
- Platform
- Windows
Hello. I have a
Is there any way to suppress that download dialog or at least hide the path from being visible?
Workbook_Open()
event that will open an external workbook and copy the values out and into a hidden sheet of ThisWorkbook. There's no issue with that functionality of the code. When the external file is opened, however, a download dialog displays showing the path of the external file, which is not ideal as that path should not be revealed. Sometimes it shows and sometimes it does not, which I'm assuming is based on the network speed at the time the file is being opened. I've tried wrapping the GetObject
portion with Application.DisplayAlerts = False
, which did not work. I've also tried changing the open method to a Workbooks.open()
, but that also does not work. Is there any way to suppress that download dialog or at least hide the path from being visible?
VBA Code:
Dim fPath As String: fPath = "\\network.networkpath.com\folder\subfolder\main\Unit Folder\Tracker\"
Dim folder As String: folder = Dir(fPath, vbDirectory)
If folder = vbNullString Then
Else
Dim extSh As Worksheet
Application.DisplayAlerts = False
Set extSh = GetObject(fPath & "Tracker - Testing .xlsm").Worksheets("Webcast Schedules")
Application.DisplayAlerts = True
Dim thisWB As Workbook: Set thisWB = ThisWorkbook
extSh.Parent.Application.EnableEvents = False
With extSh
.Columns("A:A").Copy thisWB.Sheets("Lists").Columns("B:B")
End With
extSh.Parent.Close savechanges:=False
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End If