Content from Text box to Cell

E

eLaCiD

Hi

Lokking for (macro) solution to copy content of Text box to Cell

Example :
From time to time content of Text box is manually changed.
Every time when macro start content of this Text box is copied in cell A1
 
N

Norman Jones

Hi eLaCiD,

A textbox from the drawing tools collection?
'=============>>
Public Sub Tester()
Dim TBox As TextBox

Set TBox = ActiveSheet.TextBoxes("Text Box 1")
ActiveSheet.Range("A1").Value = TBox.Text
End Sub
'<<=============

A Controls Toolbox textbox?

Try:

Range("A1").Value = ActiveSheet.TextBox1.Text
 
G

Guest

What if the text in the box is copied to another worksheet?

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.

How can I modify the code below to perform this task?

Thanks!
 

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