Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need to create from Qlikview VBScript an Excel document containing a button, and I need to associate a VB macro to the button

Hi,

I need to create from Qlikview VBScript an Excel document containing a button,

and I need to associate a VB macro to the button. Here below the script I created.

function CreateSheet()

.....

Set XLApp = CreateObject("Excel.Application")

    XLApp.Visible = true

set XLDoc = XLApp.Workbooks.Add

      XLDoc.Worksheets(1).Buttons.Add(50, 50, 50, 50).Select

      XLDoc.Worksheets(1).Buttons(1).Name = "btnPippo"

      'XLDoc.Worksheets(1).Buttons("btnPippo").Caption = "Pippo"

      XLDoc.Worksheets(1).Buttons("btnPippo").OnAction="pippo"

.......

end function  

    function pippo()

    msgbox "ciao"

    end function

I'm able to create the button,  but I got an error ( ) when I try to associate the "OnAction" method.

Does anyone has experienced such a problem?

thank you very much

0 Replies