Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256

    Unanswered: How to surpress OLEDB error

    I currently use VBA to refresh OLAP data from an offline cube. The initial connection has been done with MS query.
    When refreshing I keep running into a pop-up that says 'cannot connect to datasource' (for every refreshed pivottable)
    Is there a way to surpress the error-massage?
    The VBA runs correctly, so I need to cancel every pop-up form when opening the workbook..
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Howdy. Two points:

    1. Code
    Code:
    Application.DisplayAlerts = False
    Display alerts only works when the macro is running. So, the best place to use the above code is in the Open Workbook module.

    expression.Open(FileName, UpdateLinks[I], ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)

    Value Meaning
    0 Doesn 't update any references
    1 Updates external references but Not remote references
    2 Updates remote references but Not external references
    3 Updates both remote And external references



    2. Preferences

    If you want to turn off the "Update Links" prompt. Go to Edit - Edit Links - Startup Prompt and then change the preferences.
    Last edited by shades; 10-03-05 at 10:58.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    Thank you.
    In my case It looks like the errormessage does not originate from Excel itself.
    If I use your code, I still get the pop-up error message.
    Possible, the message is created by MS Query (as this was used initially to create a connection to the offline cube)
    Any other ideas?
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •