Populating a UserForm'sTextBox with a value

  • Thread starter Thread starter Rob
  • Start date Start date
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
 
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
 
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
 
Hi Jim,

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

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top