I need to find the VBA code to add x number of tabs to a multipage in a userform in excel. I can manually add tabs if I use the visual basic editor, but I want to be able to dynamically add/delete tabs using VBA during runtime.
Thanks
The Tabs
in a MultiPage1
are called Pages
and you can add them using
MultiPage1.Pages.Add
You can use the above code in a loop to add pages. Please refer to Excel's inbuilt help for more details
Edit:
Just saw the 2nd part of the question. To delete, say the 1st page use this
MultiPage1.Pages.Remove (0)