Copy TextBox Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a userform with multiple textboxes , I want to be able to highlight
text in a text-box and hit a button which would essentialy copy the text
string and based on which button I had clicked send it to the appropriate
designated cell in a spreadsheet. If this is at all possible I would greatly
appreciate any help or direction.

Thank you.
 
Something like:
Private Sub CommandButton1_Click()
if textbox1.value <>"" then
with sheet1
..select
range("A1").value = textbox1.value
else
msgbox "There is NO Value in Textbox1 !!"
end if
end with
end sub


Changing Texbox1 to what ever you need and the Sheet1 & A1 to also suit.

Corey....
I have a userform with multiple textboxes , I want to be able to highlight
text in a text-box and hit a button which would essentialy copy the text
string and based on which button I had clicked send it to the appropriate
designated cell in a spreadsheet. If this is at all possible I would greatly
appreciate any help or direction.

Thank you.
 
Thank you Corey, but I was hoping it could copy just the selected string of
text within the text box and copy/Move it. Example: TextBox "This Useform is
for the purpose of tracking parts, orders, and status." I was wondering if
it is possible to select " part, orders and status" within the text box ....
then hit the button and have just that phrase copy to a 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