I have VBA code written on a Windows OS (yes I know) and some of my clients are running on a MAC. The code opens a number of different connections into a FileMaker database using an ODBC connection.
On each connection, the Mac OS prompts the user to connect. The login and password are already populated as part of the connection string.
I would like to know if there is a way to avoid these prompts or intercept them and have the VBA hit enter.
I have tried Application.DisplayAlerts = False but it does not work.
Below is the code I use to create the connection. DSN_String is the name of the DSN definition in the ODBC Manager.
Thanks
On each connection, the Mac OS prompts the user to connect. The login and password are already populated as part of the connection string.
I would like to know if there is a way to avoid these prompts or intercept them and have the VBA hit enter.
I have tried Application.DisplayAlerts = False but it does not work.
Below is the code I use to create the connection. DSN_String is the name of the DSN definition in the ODBC Manager.
Code:
connstring = "ODBC;DSN=" & DSN_String & ";UID=Admin;PWD=;UID=Admin;PWD=;"
sqlstring = Array( _
"SELECT Current_Year.Workshop_Year" & Chr(13) & "" & Chr(10) & "FROM Current_Year Current_Year" _
)
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Range("I10"), Sql:=sqlstring)
.refresh
End With
Thanks