Hello!
We're migrating a file from W10 to MacOS and it contains some power queries and pivot tables. When I open the file it gives me this alert - [DataSource.NotFound] Folder or File not found: Could not find a part of the path - regarding the files from Windows due to not finding them.
I'm trying to make this file both MacOS and W10 compatible and I've created some macros to replace the power query on MacOS which work fine, but I wanted to disable this alert or even the connections to the files from W10 on MacOS since we won't use them in that environment.
The code I have now is as follows:
Any help is appreciated and thank you in advance!
We're migrating a file from W10 to MacOS and it contains some power queries and pivot tables. When I open the file it gives me this alert - [DataSource.NotFound] Folder or File not found: Could not find a part of the path - regarding the files from Windows due to not finding them.
I'm trying to make this file both MacOS and W10 compatible and I've created some macros to replace the power query on MacOS which work fine, but I wanted to disable this alert or even the connections to the files from W10 on MacOS since we won't use them in that environment.
The code I have now is as follows:
VBA Code:
Private Sub Workbook_Open()
Dim OS As String
OS = Application.OperatingSystem
If OS Like "*Mac*" Then
With Application
.DisplayAlerts = False
.AlertBeforeOverwriting = False
.Wait (Now + TimeValue("0:00:03"))
.DisplayAlerts = True
.AlertBeforeOverwriting = True
End With
Else
MsgBox ("Testing for Windows")
End If
End Sub
Any help is appreciated and thank you in advance!