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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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.

Labels (1)
1 Reply
marcus_sommer
MVP
MVP

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