I need to change the controlsource for a textbox in a userform depending on the username. Is there a way to do this. I tried Me.TextBox1.ControlSource = lpoCust.
LpoCust is a named cell
I need to change the controlsource for a textbox in a userform depending on the username. Is there a way to do this. I tried Me.TextBox1.ControlSource = lpoCust.
LpoCust is a named cell
Bjotr
Just put quotation marks round the named range (within the Userform Initialize code) like this:
Me.TextBox1.ControlSource = "LpoCust"
or if you want something from another sheet, use something like:
Me.TextBox1.ControlSource = "Sheet2!E1"