TEXTBOX in USERFORM

  • Thread starter Thread starter RUUD VAN DEURSEN
  • Start date Start date
R

RUUD VAN DEURSEN

I have a Userform1

In a worksheet, when i select a number of cells (any
cells) what is the code to put in text in these cells
with use of the textbox on the userform.

thank you
 
Do you mean something like?

Userform1.Textbox1.Text = ACtivecell.Value

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
When i doubleclick on the textbox1 i can past the code
like this:

Private Sub TextBox1_Change()
UserForm1.TextBox1.Text = ActiveCell.Value
End Sub

Is this the right procedure


But it is not possible to fill the textbox with text.
 
I presume that you mean

Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm1.TextBox1.Text = ActiveCell.Value
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thank You.
-----Original Message-----
I presume that you mean

Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm1.TextBox1.Text = ActiveCell.Value
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)





.
 
You have it reversed:

Private Sub TextBox1_Change()
ActiveCell.Value = UserForm1.TextBox1.Text
End Sub

to put the value of the textbox into the cell.
 

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