ActiveX and excel

  • Hi Everyone,

    I have a DTS package with an ActiveX task that is used to call and then refresh excel pivot tables. This can be done easily, but today I have a request to send to customers reports that use the same excel template with macros and pivot tables on it.  I can use ActiveX to call and refresh these pivot tables, but the problem is that whenever this excel file opens, a Macro security warning message pops up.  Is there anyway from my ActiveX code, I can choose "Enable Macro" button and then refresh the pivot tables on this excel template?

    Thanks!

     

  • Have you tried digitally signing the macro in the Excel file?

    Otherwise, you can try using sendkeys to click the button.

  • In your activex script try using -

    excelapp.displayalerts = false


    ------------------------------
    The Users are always right - when I'm not wrong!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply