Suppress Analysis Services Connection Wizard

Kdbailey

Board Regular
Joined
Aug 1, 2012
Messages
156
Hello,

What I'm looking for is a way to suppress the Analysis Services Connection wizard from popping up if a user inputs an incorrect variable for a OLEDB connection.

Basically I have 3 variables. Server, cube and user. I build the connection and then prior to using it, I test it by using Workbookconnection.OLEDB.Reconnect. If all three are valid it reconnects with no error. If one of the three are invalid, a wizard pops up. Is there any way to suppress the wizard? I'd rather it just log the error.

Code:
conn.OLEDBConnection.Reconnect
    If Err.Number = 91 Or Err.Number = 1004 Then
        'Account Error
        errfree = False
        logstr = "Error: Account '" & singlerole.Value & "' is not connecting.  Please check the account is correct or exists."
        logresult = Logger(logstr)
        GoTo skip
    ElseIf Err.Number <> 0 Then
        'Unknown Error
        errfree = False
        logstr = "Unknown Error: Account '" & singlerole.Value & "' is not connecting.  Please check the server, cube and account are correct."
        logresult = Logger(logstr)
        GoTo skip
    Else
        logstr = "Success initializing connection for Account: '" & singlerole.Value & "'"
        logresult = Logger(logstr)
    End If
    Err.Clear
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top