- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Select Tab in the Container using Macro
Hi, All!
I have a Container with two tabs (two different tables inside). How could I using macro select one tab or another (accordingly user will see one table or another)?
Thanks.
- Tags:
- container
- « Previous Replies
-
- 1
- 2
- Next Replies »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As per my understanding u need to display the tables(Charts) as per buttons click or sheet activate using some buttons.
I m sending the solution for the both please refer the attached qve application. and revert me back for any clarifications.
Thanks
Manesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Manesh
Thanks. But I want that these tables are placed in the Container (please, see attach). If we click of first button - first tab will be displayed, second button - second tab will be displayed. Could you advice?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please refer the attached application.
Sheet1 --Press -- Display Sheet1
Sheet2--Press - Display sheet2
Revert for issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Manesh, I should use Container. Where is Container in your example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maxim,
I haven't tried this yet, but API 11 has this example
Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
set ContProp=ContainerObj.GetProperties
ActiveObject=ContProp.SingleObjectActiveIndex
msgbox("Active Object=" & ActiveObject & " Id=" & ContProp.ContainedObjects.Item(ActiveObject).Id)
and property SingleObjectActiveIndex is described as read-write.
So you may try to assign to this property Id of one or another container object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did anyone get this working please?
I need to activate an object within a container via a button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have just tried a solution for the very same purpose and it has worked properly. Please find the sample code below. You can write as many copies of the same subprocedure as you need, by changing the name of the sub and the value of the MV_ActiveIndex variable so that you can attach each sub to a button, enabling your macros to be run when clicked on the relevant buttons.
Hope this helps.
Regards,
sub ContTabSelect0
set MV_ContainerObj = ActiveDocument.GetSheetObject("CT13")
Set MV_ContProp = MV_ContainerObj.GetProperties
MV_ActiveIndex2 = MV_ContProp.SingleObjectActiveIndex
MV_ActiveIndex2 = 0
MV_ContProp.SingleObjectActiveIndex = MV_ActiveIndex2
MV_ContainerObj.SetProperties MV_ContProp
End Sub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you ever get this to work on a button?
- « Previous Replies
-
- 1
- 2
- Next Replies »