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)?
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

xl_psychic

Active Member
Joined
Jan 4, 2004
Messages
359
Wouldn't it be Usrfrm1.MultiPage1.Pages(Usrfrm1.MultiPage1.Value).ActiveControl.Name

Hope this helps..
 

JONESY

Board Regular
Joined
Jul 23, 2004
Messages
63
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?
 

JONESY

Board Regular
Joined
Jul 23, 2004
Messages
63
Sorry being thick i usually have several bad days

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

Sorry !
 

Watch MrExcel Video

Forum statistics

Threads
1,118,680
Messages
5,573,624
Members
412,539
Latest member
itchy00
Top