Refer to Userform Control with name

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
Can I refer to a userform's control with its name?

For instance, I have a textbox named "Criteria1." I want to do this,

Me.Controls("Criteria1").Value = "123"

Instead of

Me.Criteria1.Value = "123"

But I get an error that the control cannot be found.
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Watch MrExcel Video

Forum statistics

Threads
1,109,204
Messages
5,527,405
Members
409,760
Latest member
zeeshansyed

This Week's Hot Topics

Top