PC Review


Reply
Thread Tools Rate Thread

Copy from a text box

 
 
Stephen C
Guest
Posts: n/a
 
      11th Nov 2008
I have found some code to copy a cells data to a textbox as shown below. what
I require is the reverse, to copy the textbox data to a cell?

Private Sub Commandbutton1_click()
worksheets("Sheet2").Textbox1.Text = _
Worksheets("Sheet1").Range("B9").Text
End sub

I am using excel 2000
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      11th Nov 2008
Sub stephen()
ActiveSheet.Shapes("Text Box 1").Select
With Range("A1")
.Value = Selection.Characters.Text
End With
End Sub
--
Gary''s Student - gsnu200812
 
Reply With Quote
 
Stephen C
Guest
Posts: n/a
 
      11th Nov 2008
I had already tried that and it does not work, I have managed to get it to
work by changing the .text to .value.

Thanks for the help

"royUK" wrote:

>
> Just reverse it
>
>
> Code:
> --------------------
> Worksheets("Sheet1").Range("B9").Text = _
> worksheets("Sheet2").Textbox1.Text
> --------------------
>
>
> --
> royUK
>
> Hope that helps, RoyUK
> For tips & examples visit my 'web site
> ' (http://www.excel-it.com)
> ------------------------------------------------------------------------
> royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
> View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27904
>
>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      11th Nov 2008
Text is a read-only property of the Range object and contains the
actual text as displayed in the cell, governed by the formatting
applied to the cell. Value is read/write and is the underlying value
of the cell, regardless of how it is formatted for display.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Tue, 11 Nov 2008 03:08:29 -0800, Stephen C
<(E-Mail Removed)> wrote:

>I had already tried that and it does not work, I have managed to get it to
>work by changing the .text to .value.
>
>Thanks for the help
>
>"royUK" wrote:
>
>>
>> Just reverse it
>>
>>
>> Code:
>> --------------------
>> Worksheets("Sheet1").Range("B9").Text = _
>> worksheets("Sheet2").Textbox1.Text
>> --------------------
>>
>>
>> --
>> royUK
>>
>> Hope that helps, RoyUK
>> For tips & examples visit my 'web site
>> ' (http://www.excel-it.com)
>> ------------------------------------------------------------------------
>> royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
>> View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27904
>>
>>

 
Reply With Quote
 
Alan Pederson
Guest
Posts: n/a
 
      5th Feb 2009
I am using Office 2007 and can not get this to work with a Textbox that is
directly on an Excel worksheet. Does this only work if it is on a form?
--
Alan


"Chip Pearson" wrote:

> Text is a read-only property of the Range object and contains the
> actual text as displayed in the cell, governed by the formatting
> applied to the cell. Value is read/write and is the underlying value
> of the cell, regardless of how it is formatted for display.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional
> Excel Product Group
> Pearson Software Consulting, LLC
> www.cpearson.com
> (email on web site)
>
> On Tue, 11 Nov 2008 03:08:29 -0800, Stephen C
> <(E-Mail Removed)> wrote:
>
> >I had already tried that and it does not work, I have managed to get it to
> >work by changing the .text to .value.
> >
> >Thanks for the help
> >
> >"royUK" wrote:
> >
> >>
> >> Just reverse it
> >>
> >>
> >> Code:
> >> --------------------
> >> Worksheets("Sheet1").Range("B9").Text = _
> >> worksheets("Sheet2").Textbox1.Text
> >> --------------------
> >>
> >>
> >> --
> >> royUK
> >>
> >> Hope that helps, RoyUK
> >> For tips & examples visit my 'web site
> >> ' (http://www.excel-it.com)
> >> ------------------------------------------------------------------------
> >> royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
> >> View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27904
> >>
> >>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text from cell and paste it in a separate text box (contents tobe linked) andreashermle Microsoft Excel Programming 7 13th Dec 2009 07:51 PM
Automatically copy form-field text to text box in header of same d =?Utf-8?B?TWVyY2VkZXMuSw==?= Microsoft Word Document Management 7 30th Sep 2007 02:37 PM
open some txt files ,find text , copy the text before that to a single cell gus Microsoft Excel Programming 2 11th Jul 2005 05:40 PM
When I copy text, Word pastes a print screen - not the text I copi =?Utf-8?B?Ymlzc3kx?= Microsoft Word Document Management 1 22nd Apr 2005 01:16 AM
Copy the text data from the column of an excel sheet into a text file . Sharbat Microsoft Excel Misc 2 21st Mar 2004 12:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:57 PM.