ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Copy text from text box to cell in another worksheet (https://www.excelbanter.com/excel-worksheet-functions/95761-copy-text-text-box-cell-another-worksheet.html)

pfa

Copy text from text box to cell in another worksheet
 
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!


Mallycat

Copy text from text box to cell in another worksheet
 

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

This was remarkably difficult to work out - maybe that's why you
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

Matt


--
Mallycat
------------------------------------------------------------------------
Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514
View this thread: http://www.excelforum.com/showthread...hreadid=555079


pfa

Copy text from text box to cell in another worksheet
 
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!



"Mallycat" wrote:


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

This was remarkably difficult to work out - maybe that's why you
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

Matt


--
Mallycat
------------------------------------------------------------------------
Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514
View this thread: http://www.excelforum.com/showthread...hreadid=555079




All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com