VBA Userform Control of multiple userform controls

I have built a data entry VBA application in Excel so we can input data electronically instead of manually on paper only. I created a series of Userforms to display one at a time to "walk thru" the test procedure and allow entry of the data for one section at a time. The problem I have is that I am trying to use the standard form controls "frmTest.Hide" or "Unload Me" when done with the forms. Then if I wish to redisplay one or more of the forms for re-entry use "Load frmTest" and/or just frmtest.Show if old form just hidden. I am seeing that the old forms are not hiding or unloading and worse when I try to redisplay with either the "Load frmTest" if previously unloaded and "frmTest.show" I get a VBA error that it cannot display in modal the form. I thought the forms were supposed to work like VB? Anyone know what's going on. I have looked thru the VBA Programming Reference and my reference books on VBA and unable to find an answer.
[947 byte] By [SunshineDesign] at [2007-12-25]
# 1

Hello,

You need to explain a bit more of what you are trying to do or maybe even post a bit of code. From the limited details you have provided you seem to be using the correct instructions but you need to think out the logic.

Post some code!

Chas

ChasAA at 2007-8-31 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 2

I have several forms that I am trying to manage a user thru to enter test data with test procedure prompts.I have a main intro form, several test prompt and input forms and a final close form to review, save and print the data report sheet in excel.

I want the user to be able to navigate between the forms. Using the "frmTest.Hide" command does not hide the form and "Unload frmTest" does not unload the form. The forms are staying persistant in the view space. They do decrease in view Z-Order, but they do not go away or become hidden with the form commands. The old forms persist in the background. So when I then try to go back to some of the forms to allow re-entry of data, for instance, I get an error that VBA does not allow modal forms to be displayed and the application errors and quits. These are typical form commands in VB6 and have worked successfully with VB6 without issues. So why does VBA have a problem managing forms and controlling what is visible or loaded, which form can be active and how would one then make forms hidden or unloaded in VBA. By the way, I had code command examples in my original post. Please advise if this makes my primary post more understandable.

SunshineDesign at 2007-8-31 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 3

I was able to find my answer. In VBA you must set the Userform to nonmodal for the .Hide method and the Unload to work properly. the default mode is modal, which does not allow use of the .hide method or unloading forms at run time.

SunshineDesign at 2007-8-31 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...