Multiple UserForms

sgrzzl

New Member
Joined
Aug 9, 2011
Messages
7
I have several UserForms that I am using to input data into specific worksheet cells or ranges using the following:

Private Sub ContactTitle_Change()
Range("Contact_Title") = ContactTitle.Value
End Sub


I have Next and Back buttons on each UserForm. Everything is working great except when I use the back button it Unloads the current Userform and Loads the previous form and all the fields are blank.

When I press the back and the previous form appears I would like the fields to to display the information that I have already entered into the form and stored in my worksheet.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Welcome to the board.
How are you dismissing these userforms before calling them back up with your back button?

If you dismiss a UForm by using the Unload UserForm1 method, it unloads and requires re-loading when called back up.

If you dismiss a userform using the UserForm1.Hide method, it will dismiss the userform (as far as the user is concerned) but it will be retained in memory - with all fields still filled in. (Thus, when you recall it with the back button your previous data will still be present.)

Does that help?
 
Upvote 0
Sorry to ask a question rather than offer a solution, but why the need for multiple forms? Have you tried the Multi-Page control? You could hide the tabs and still use PRevious, Next <NEXT>buttons.
 
Last edited:
Upvote 0
Welcome to the board.
How are you dismissing these userforms before calling them back up with your back button?

If you dismiss a UForm by using the Unload UserForm1 method, it unloads and requires re-loading when called back up.

If you dismiss a userform using the UserForm1.Hide method, it will dismiss the userform (as far as the user is concerned) but it will be retained in memory - with all fields still filled in. (Thus, when you recall it with the back button your previous data will still be present.)

Does that help?
Thanks! That works.
 
Upvote 0
Sorry to ask a question rather than offer a solution, but why the need for multiple forms? Have you tried the Multi-Page control? You could hide the tabs and still use PRevious, Next <NEXT>buttons.
I am using Multi-page controls on several linked UserForms for a Quote Generation tool.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

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