How do I copy the value of the expecific textbox of the Open UserFom?

0

It has an easier way than typing x = UserForm1.textbox2.value ?

This statement means: Copy the value of the UserForm1 text box1 .

I wanted to replace the "UserForm1" statement with something that means "Open UserForm."

that is: copy the value of text box 1 from the "Open UserForm".

    
asked by anonymous 31.08.2018 / 17:16

2 answers

0

To get anything from a form that is currently open, just use the "me":

a = me.textBox.value
    
27.09.2018 / 17:57
0
    For i = 0 To Forms.Count - 1
    If Forms(i).ZOrder = 0 Then
        Forms(i).TextBox1.text
    End If
    Next

Does it help you?

    
06.11.2018 / 19:01