View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Procedure too large

Be more specific:

Me.TextBox1.ControlSource _
= Activeworkbook.Worksheets("sheet1").Range("a1").Ad dress(external:=True)



Ozgur Pars wrote:

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




--

Dave Peterson