MULTI PAGE USER FORMS OR TABSTRIP? EXCEL 2007

zemaor
zemaor used Ask the Experts™
on
I am attempting to create forms from 3 different food menus (Breakfast (1), Lunch/Dinner (2), and Liquid Diet (3). Each menus function is to add up sodium and carbs for dietary tracking. Now I have decided that I want to be able to toggle from one menu to the next as some have different food value choices. I am unsure if I should be creating a mulit page user form or using a tabstrip to do that. I am not sure I am even on the right track. Can someone take a look and see? I haven't linked the forms yet (LIisted in VBA pane as Menu1, Menu2, Menu3) Thanks, Z

Ps. I am a novice--  tempQASodium-Carbs-2010.xlsm
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jan Karel PieterseExcel and VBA Expert

Commented:
Generally speaking, a multipage is simpler as it handles the showing and hiding of the relevant pages itself. With a tabstrip, you have to do the heavy lifting of showing and hiding controls yourself.
zemaor,

The great advantage of a Tabstrip is that it can contain large quantities of information but initially take up little space on a UserForm. It is a good way to proceed and it is elegant and pretty simple to operate.

On the other hand multi page Userforms are clunky and inelegant. There is not much to choose between the two in terms of VBA coding so i would ignore that. Once you've got a handle on the VBA for a Tabstrip it's simple. So my option would be a Tabstrip for your application.

Patrick
Jan Karel PieterseExcel and VBA Expert

Commented:
Hi Patrick,

Funny how our advice is contradictory (if that's the right word )!
Not sure I follow what you mean by the tabstrip can contain large quantities of information?
I never use a tabstrip, as I don't see it's advantage over the multipage. If I chang epages on the multipage, only the controls of the active page are shown. Does the tabstrip have that functionality?
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

The Tabstrip effectively gives you pages that are available just by selecting whichever tab you want. It's neat and tidy and very functional. Tabstrips are controlled directly with VBA so it's not an issue.

However each to their own, if you like multi-page Userforms there's nothing the matter with that approach.

Patrick
NorieAnalyst Assistant

Commented:
Got to agree here - multipages seem to be more useful than tabstrips.
Can you even add a control to a tab in a tab strip?

Menus-Multipage-Form.PNG
Jan Karel PieterseExcel and VBA Expert
Commented:
OK, I did some reading. Here is my take on them:

Tabstrip: Use that if you need to have the same (or very similar) set of controls change their content based on the selected tab. For example if you're showing data of Sheet1 on tab1 and want to show data of Sheet2 on tab2.

Multipage: Use this if you have different controls for the different tabs. A Wizard-like project would typically benefit most from a multi-page.

Funny enough, your example appears to be somewhere between these two!

Author

Commented:
Thanks all three of you for your input. It seems there is more than one answer. I haven't explored the toggle button, but as of now, I have added two function buttons on each page- to flip back and forth. It seems to work ok. But by the time I get finished, it may all change~ no doubt~!! Thanks-- your answers give me something to think about. And thanks to imnorie for the nice visual~!
zemaor - Thanks for the points - Patrick

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial