Copy text from text box to cell in another worksheet

G

Guest

This is a re-post (original 6/21), much summarized and, hopefully a lot
clearer...Any assistance is greatly appreciated.

I have a tab labeled I-16 where I have a text box (text box 2). I would like
to have the text in the box copied to cell J45 on a tab named 'database'.
Both tabs are on the same workbook.

Also, the text is more than 1,024 characters long, so there may a problem
when it gets copied over to cell J45.



Thanks!
 
M

Mallycat

I assume you want to automate this task - otherwise you would just cop
it yourself!

This was remarkably difficult to work out - maybe that's why yo
haven't had a response before now.

Sub copyText()
Sheets("I-16").Shapes("Text Box 2").Select
Sheets("database").Range("J45").Value = Selection.Characters.Text
End Sub

Mat
 
G

Guest

Matt,

Thanks very much for the code. It works as advertised. Apologies for not
having mentioned this was to be an automated task. I am glad you noticed...

One more question if I may, please.
Is there a way to get around the maximum character limitation? The text in
the text box is quite long, certainly over 1024 characters long.

Thanks gain for all your help!
 
A

Alpachino

Hi Mallycat, i think the code you provided may help me but I'm not code or VB
man.

My situation is that I have designed Invoice Template .xLT form and using
Text Boxes from "Form" tool bar to enter text into Invoice Address and
Delivery Address TEXT Boxes.

Now I want to be able to pick the information that is entered into Invoice
and Delivery address text boxes say from the "Invoice" sheet and automatical
copy this information into another TEXT BOX on another Sheet called "Delivery
Note" in the same workbook.

This way we don't have to type information that is already on the INVOICE
sheet onto to the DELIVERY NOTE sheet in the text boxes where the address
should appear.

I have setup some macros and macros buttons for printing so these show up in
the VB modules. However am still a novice when it comes to VB and don't know
what things mean when I am in the VB editor and you would need to tell me
where the code should go and whether I need to use the VB Text Box anywhere.
Also how do you know which box you are referring too as the normal text box I
don't where to find it's reference name, cell etc. like you can with the VB
text box.

Your help would be much appreciated.
Alpachino
 

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

Top