Procedure too large
This works for me :
TextBox1.ControlSource = Range("A2").Address
or
TextBox1.ControlSource = "A2"
It will refer to the active sheet.
NickHK
"Ozgur Pars" ...
Sorry for the neverending questions but I am missingsomething here and I
could not get it from the help or the net.
I am trying to set the controlsource property for a textbox1 on a
userform1.
I replicated the example from the help file:
Private Sub UserForm1_Initialize()
TextBox1.ControlSource = "a1"
End Sub
That seems not to work. I tried to input the link in the properties menu
manually but I am getting a "Invalid property value" error message.
What am I missing or doing wrong here?
Thanks,
Ozgur
"Ozgur Pars" wrote:
Nick,
thanks for the reply I will look into this property.
Ozgur
"NickHK" wrote:
Does the .ControlSource property of the Textbox achieve this without
code ?
NickHK
"Ozgur Pars" wrote in message
...
Hi,
I am currently working on a userform where I use textboxes to display
from
a
workbook. Everytime the workbook calculates the texboxes are updated.
It
was
going all fine until I hit a limit and the above compile error
message
came
up.
If anyone could help me make my code simpler and more efficient I
would
greatly appreciate it.
I use these code(of course hundreds of them because I have several
option
buttons and the value of the txtboxes must change) when the workbook
is
calculated:
UserForm1.TextBox1.Value = Sheets("Calculation").Range("A1").Value
UserForm1.TextBox1.Text = Sheets("Calculation").Range("A1").Text
I was wondering if one has to specify the text also everytime the
value is
changing? If I can fix the text style I can probably get rid of the
problem.
Thanks for your help,
Ozgur
|