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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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