textboxes and userforms

JONESY

Board Regular
Joined
Jul 23, 2004
Messages
63
Hi Guys
I have a multipage (3) userform(Usrfrm1) each page has 46 textboxes. On entry into a particular textbox on each page I want to launch another userform (Usrfrm2) which is a scripting dictionary that finally gives a unique code, on button click I want it to put the unique code into the multipage userform activetextbox.

Me.MultiPage1.Pages(Me.MultiPage1.Value).ActiveControl.Name
This gives me the textbox name of the activetextbox in the Multipage Userform...but

How do I get this value to be recognised in the other userform (Usrfrm2)?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Wouldn't it be Usrfrm1.MultiPage1.Pages(Usrfrm1.MultiPage1.Value).ActiveControl.Name

Hope this helps..
 
Upvote 0
Hi you could use the name of the userform but this is not the issue as Me does that job fine if I say

Commcode = Me.MultiPage1.Pages(Me.MultiPage1.Value).ActiveControl.Name

This is in Textbox26_Enter, so on entering TB26 Commcode = "Textbox26"

but I cannot export this value to Usrfrm2 because I want to say something like

Usrfrm1.Controls(Commcode).value = Usrfrm2.combobox3.value

Hope I'm being clear?
 
Upvote 0
Sorry being thick i usually have several bad days

Usrfrm1.Controls(Usrfrm1.Commcode).value = Usrfrm2.combobox3.value

Sorry !
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,847
Members
449,051
Latest member
excelquestion515

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