USE DATA FROM TEXT BOX IN A CELL - PLEASE HELP

D

DMW

Hi there

I'm using Excel 2000 on a W2K machine. I'm putting together a form
where I need quite a large field for up to 250 words - which surpasses
the allowed visible/printable characters for a cell (cell is merged
across 3 columns). So, after surfing these waters, I came across the
possible solution of using a text box instead. However, I'm now
stumped as to how to transfer the information in the text box into a
data capture cell sitting behind the main data entry form. Can someone
please help me as so far I've been unsuccessful in solving his problem
so far.

Many thanks.

Donna
 
D

DMW

Gary''s Student said:
Hi Donna:

If you have data in a TextBox and want to transfer it to a cell in the
worksheet then:

Sub getext()
Dim s As String
ActiveSheet.Shapes("Text Box 1").Select
s = Selection.Characters.Text
Range("A100").Value = s
End Sub

You can modify this to go thru any number of looping arrangements if you
have more than one TextBox.

If you are not familiar with vba, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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