Excel VBA to suppress msgBox prompt?

Joined
Jan 8, 2018
Messages
1
Reaction score
0
Points
1
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.

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
 
Joined
Jan 1, 2009
Messages
15,506
Reaction score
3,866
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
Welcome to the forum. I'm not able to answer your question, but wanted you to know that the owners of this site plan to shut it down any time now. Read the links in my sig for details and to find out what we, the users, are doing.

In the meantime, someone will come along to give you some help, I'm sure.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top