Assigning Values

G

Gary Robinson

Hi All

I have a question, i have a form with loads of text boxes on it, i have some
code that will be used for each textbox in a sepertae sub procedure. The
question i have is, can i specify in a string which textbox is to be
altered. I can do this normally by typing in each one seperatley, but i'm
looking for an easier way. Hope this makes sense.

Thanks in advance


Gary
 
T

Tim Ferguson

can i specify in a string which textbox is to be
altered.

strControlName = "txtAlpha"


Set ctlMyControl = Me.Controls(strControlName)


Me.Controls(strControlName).BackColor = vbRed



etc


Hope that helps


Tim F
 
Top