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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro array problem

Dear all,

I have a problem with the following macro:

Sub Export_Dashboard_Chart_Images()

    ExportCharts(1) = "CH19"

    ExportCharts(2) = "CH20"

    ExportCharts(3) = "CH23"

    ExportCharts(4) = "CH24"

    ExportCharts(5) = "CH27"

    ExportCharts(6) = "CH28"

    ExportCharts(7) = "CH50"

    ExportCharts(8) = "CH52"

    For i=Lbound(ExportCharts) to Ubound(ExportCharts)   

        Set obj = ActiveDocument.GetSheetObject(ExportCharts(i))

        obj.ExportBitmapToFile "D:\Documents and Settings\All Users\Desktop\Export\" &obj.GetCaption.Name.v &".png"

        'ActiveDocument.Variables("vDashboardChartType").SetContent "Absolute", true

    Next

End Sub

I want to export certain charts indentified in the array. When I run the macro, the editor appears without any error message. Can someone tell me what is wrong with this macro?

Thanks!

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Ok lbound return 0 instead of 1. Stupid beginners mistake.

View solution in original post

1 Reply
Not applicable
Author

Ok lbound return 0 instead of 1. Stupid beginners mistake.