Glenn_Suggs
New Member
- Joined
- Aug 9, 2012
- Messages
- 13
I'm having trouble with a user form that contains three text boxes. I want to set the control source for each to one of three cells on a worksheet (A1,A2,A3). I'm using the following syntax. Can you please tell me where I'm going wrong? I get the message "Application-defined or object-defined error." I'm using Chr(34) to place the two double-quotes in the Range part.
dim i as integer
For i = 1 to 3
Me("txtPub" & Format(i, "0")).ControlSource = ActiveWorkbook.Sheets("Sheet1").Range(Chr(34) & "A" & Format(i, "0") & Chr(34))
Next i
Thanks in advance.
dim i as integer
For i = 1 to 3
Me("txtPub" & Format(i, "0")).ControlSource = ActiveWorkbook.Sheets("Sheet1").Range(Chr(34) & "A" & Format(i, "0") & Chr(34))
Next i
Thanks in advance.