View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rocky McKinley Rocky McKinley is offline
external usenet poster
 
Posts: 102
Default Problem with TextBox & ControlSource - Please Help

You could try to set the control source property for each textbox after the
row is inserted.

(.Insert shift=:xlDown) so that row 2 is blank.
load userform
now set the control source for each textbox with code
and finally load & show the form

or

You could also try "Userform1.Repaint" which Updates the display by
redrawing the form or page.

--
Regards,
Rocky McKinley


wrote in message
...
I have a form which has a number of TextBoxes that have their

ControlSource
property set to various cells in row 2 of a worksheet.

The routine which displays the form begins by inserting a new row as row 2
(.Insert shift=:xlDown) so that row 2 is blank.
It then does Application.Calculate (should not be necessary)
and finally shows the form.

The first time the form is displayed the TextBoxes show the values that

are
in row 3 rather than the blank values that are in row two. If I change a
TextBox the corresponding in cell in row 2 changes as it should.

Why is the form displaying values in row 3 in TextBoxes whose

ControlSource
is set to row 2? How can I fix it.

MANY thanks for any help on this one.