Populating a UserForm'sTextBox with a value

R

Rob

Hi,

I would like to know how to get a UserForm's TextBox to show the value of a
cell when the UserForm is opened.
I named the TextBox GiftTextBox, and I was hoping something like
GiftTextBox.Value = ActiveCell.Offset(0, 6).Value would do it but I can't
get that to work. Is there a simple way for the ActiveCell.Offset(0,
6).Value to be shown somehow on the UserForm? I don't care whether it's in a
TextBox or some other box, as long as I can get the value to appear on the
UserForm.

Rob
 
J

Jim Cone

Rob,

Something like...
UserForm1.GiftTextBox.Value = ActiveCell.Offset(0, 6).Value

Jim Cone
San Francisco, USA


Hi,
I would like to know how to get a UserForm's TextBox to show the value of a
cell when the UserForm is opened.
I named the TextBox GiftTextBox, and I was hoping something like
GiftTextBox.Value = ActiveCell.Offset(0, 6).Value would do it but I can't
get that to work. Is there a simple way for the ActiveCell.Offset(0,
6).Value to be shown somehow on the UserForm? I don't care whether it's in a
TextBox or some other box, as long as I can get the value to appear on the
UserForm.
Rob
 
R

Rob

Hi Henry,

Thanks for that, but in my application I needed Jim's suggestion by adding
the UserForm's name to the beginning of the line.

Rob
 
R

Rob

Hi Jim,

I was so close....but thanks! It did the trick. You can try so many things
and miss the obvious.

Rob
 
Top