Userform to userform

Rkeev

Board Regular
Joined
Mar 11, 2014
Messages
69
Hello Excel masters,

I am trying to populate (via VBA) a textbox/combo box from one user form to another user form.
The first user form has a room number in a text box1. If certain conditions exists, a button is selected to bring up another user form (both forms are modeless).
I want to pass/populate some of the 1st user Form info into the other user form.

I have tried the on initialize textbox1.value = textbox other.value but no dice. I can populate a user form text box from a spreadsheet but from box to box in separate user forms has me a little stumped.

Any help would be appreciated.

thx,
Rkeev
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
On initialize enter the following code:

Code:
Private Sub UserForm_Initialize()

Me.TextBox1.Value = UserForm1.TextBox1.Value

End Sub
 
Upvote 0
Solved--- Thanks Gavin, I was forgetting to place the user form name into code. Plus I was also going from a list box to a Txt box in anther part of the form so I had to identify the index, but thank vey much for the assistance.

thx,
RKeev
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,895
Members
449,477
Latest member
panjongshing

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