
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rename a chart object using VBa
Hi .
I have this code to create a table:
set Graph = ActiveDocument.Sheets("Main").CreateStraightTable
id = Graph.GetObjectId
msgbox "Chart Name = " & id
, so I know the chart ID ( say "Document\CH07) , but I want to rename it to CH01. I suspect this my be through the getproperties, but assistance please!
- Tags:
- new_to_qlikview
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The macro is similar to this:
sub changeID
rem ** Change unique ID of a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
GP.GRAPHLAYOUT.Frame.ObjectId = "MyChart"
g.SetProperties gp
end sub
You can also check my attachment.
(After you click, the ID will change, the second time it will fail, ok?)
Regards,
Erich


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The macro is similar to this:
sub changeID
rem ** Change unique ID of a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
GP.GRAPHLAYOUT.Frame.ObjectId = "MyChart"
g.SetProperties gp
end sub
You can also check my attachment.
(After you click, the ID will change, the second time it will fail, ok?)
Regards,
Erich

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks Eric, this is exactly what I needed!
Is there a reference document (or the api) avauilable where I can find details of the object properties?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can use the API Guide.qvw
It's located at:
C:\Program Files\QlikView\Documentation
You can also read the QV Automation reference.pdf.
There is a lot of examples in the .qvw
I think it`s not so clear how to follow it... for example, when i used:
.GRAPHLAYOUT
You get get more details by understanding the object iGraphLayout and so on...
Hope this helps,
Erich
