Multipage hide and unhide VBA

Ztcollins

Board Regular
Joined
Jun 4, 2014
Messages
69
Office Version
  1. 365
Platform
  1. Windows
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.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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:
Upvote 0
Yes this is what i was trying to do.

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

Forum statistics

Threads
1,224,932
Messages
6,181,839
Members
453,068
Latest member
DCD1872

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top