Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Copy from a text box

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy from a text box


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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Copy from a text box

Sub stephen()
ActiveSheet.Shapes("Text Box 1").Select
With Range("A1")
.Value = Selection.Characters.Text
End With
End Sub
--
Gary''s Student - gsnu200812
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Copy from a text box

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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Copy from a text box

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
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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy from a text box

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
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text cell & change text color conditionally manxman Excel Programming 2 August 31st 06 08:18 PM
text box insert in Excel - text box lines print on second copy Diana (Berry & Co) Excel Discussion (Misc queries) 0 July 26th 06 04:39 AM
Copy text from Ms Access record to Excel text box [email protected] Excel Programming 0 September 7th 05 05:27 PM
I want to link, not just copy,Word source text to a text box in Ex Carrie K Excel Worksheet Functions 0 August 12th 05 07:58 PM
open some txt files ,find text , copy the text before that to a single cell gus Excel Programming 2 July 11th 05 05:40 PM


All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"