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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count Number of Objects by Macro Code

Hi All,

I am creating charts with Macro. So it has random chart id's. Also these charts can be Bar or Pie or any chart.

I want to count the number of chart objects with Macro.

If anyone has any idea then pls share....

Thanks in Advance.

1 Reply
marcus_sommer

Hi Monika,

habe a look on this example from APIGuide.qvw (it's in your install-folder):

rem  ** remove borders from all listboxes on active sheet **

set x = ActiveDocument.ActiveSheet.GetSheetObjects

Objects = x.SheetObjects

For i = lBound(Objects) To uBound(Objects)

      set obj = Objects(i)

      if obj.GetObjectType = 1 then          'list boxes

            set p = obj.GetProperties

            p.Layout.Frame.BorderEffect = 0  'no border

            obj.SetProperties p

      end if

next

- Marcus