I am trying to make few userforms in EXCEL VBA.
I have 10 userforms and on every forms there are few textboxes. I wonder if somebody help me with coding and explanation of the following.
on starting the macro, userform1 should come up, and
if user puts 2 in textbox1 on userform1,and press ENTER(while curser still in textbox1),then only, userform1 should unload and userform2 should show.
if user puts 3 in textbox1 on userform1,and press ENTER(while curser still in textbox1),then only, userform1 should unload and userform3 should show.
and so on...................
and then on any form if user presses F2 key, the current form should unload and previous form should come up.
thanks a lot for help.
Here is a possible hint.
1. For your macro to show the form use
2. To move to another form / previous form etc, use the Keydown event of particular textboxes. The following code will close the current form and open the UserForm2 if the user presses Enter key
Hope it helps
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?