Multipage hide and unhide VBA

Ztcollins

New Member
Joined
Jun 4, 2014
Messages
38
https://1drv.ms/x/s!AiCZb_GZ2FZegdwGDeVB_yPLnEh0Jg?e=XcDm5Q

I am trying to figure out how to take the items checked on a treeview and have them match the caption of a tab on a multipage userform.
In the attached woorkbook below is a moch-up of what i have in my project. The criteria userform has the treeview. the other userform has the multipage. i am trying to have the checked items in the treeview unhide if checked or be hidden if unchecked. For now the Multipage userform only has 4 pages to choose so that would be the first selections under the basement section of the treelist. Eventually i will have a page for every selection of the treeview.
if this cant be achieved i would be happy with just being able to having the checked items populate in a neighboring cell than to where the treeview data is pulling from.

Thanks in advance for any info or help that you all can provide.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,286
Do you mean the selected item in the treeview?

For example if 2x6 Ext Wall - Basement was selected then that would be the only page visible in the multipage?

If you do then you could get the selected item like this.
Code:
Dim strSelectedItem As String

    strSelectedItem = Me.Products.SelectedItem
You could then have code that hides/unhides the pages on the multipage based on that.
 
Last edited:

Ztcollins

New Member
Joined
Jun 4, 2014
Messages
38
Yes this is what i was trying to do.

The item selected in treeview would unhide the tab named the same.
 

Forum statistics

Threads
1,078,275
Messages
5,339,227
Members
399,287
Latest member
Dave2804

Some videos you may like

This Week's Hot Topics

Top