Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue in Onopen trigger

Hi All,

I have written a macro which is used to exprot the chart and quit the application.

And Assigned this macro to onopentrigger, so that I am not able to open the application(When I open the qvw application, it is open and close immediately because of last statement of macro is quit application(qv.quit())

Please let me how can I open the application with out running that macro.

Thanks in advance.

Regards,

Kabilan K.

4 Replies
er_mohit
Master II
Master II

here i used data to send in excel with using open trigger.

but it can't close the qvw file

match with your code

Sub Exceltest

     'Set the path where the excel will be saved

     filePath = "E:\Test.xls"

     'Create the Excel spreadsheet

     Set excelFile = CreateObject("Excel.Application")

     excelFile.Visible = true

     'Create the WorkBook

     Set curWorkBook = excelFile.WorkBooks.Add

     'Create the Sheet

     Set curSheet = curWorkBook.WorkSheets(1)

     'Get the chart we want to export

     Set tableToExport = ActiveDocument.GetSheetObject("CH02")

     Set chartProperties = tableToExport.GetProperties

     tableToExport.CopyTableToClipboard true

     'Get the caption

     chartCaption = tableToExport.GetCaption.Name.v

     'MsgBox chartCaption

     'Set the first cell with the caption

     curSheet.Range("A1") = chartCaption

     'Paste the rest of the chart

     curSheet.Paste curSheet.Range("A2")

     excelFile.Visible = true

XLApp.DisplayAlerts = False

     'Save the file and quit excel

     curWorkBook.SaveAs filePath

     curWorkBook.Close

     excelFile.Quit

     'Cleanup

     Set curWorkBook = nothing

     Set excelFile = nothing

     set  XLApp = nothing

End Sub

Not applicable
Author

Hi,

I want to open the same application without running onopentrigger, which I am not able to open(because of open trigger and qv.quit()).

Regards,

Kabilan K.

er_mohit
Master II
Master II

ok

open another application and then

go to user prefrence-->Security--->uncheck the confirm launch from macro

then save it and open your application having macro

hope it helps

suniljain
Master
Master

I have solution for this issue.

Step 1 :Open qlikview

Step 2 : In Getting Started , right click on your application  and chose Open dashboard and realod data . pls change qvd name of any one QVD used by your dashboard.

Step 3: change your macro accordingly.

Regards;

Sunil