PC Review


Reply
Thread Tools Rate Thread

copy text from textbox to another application

 
 
Ken
Guest
Posts: n/a
 
      12th Sep 2010
I have a worksheet with several textboxes and command buttons next to
them. The buttons have the following code:

Private Sub CommandButton1_Click()

Dim str As String

str = ActiveSheet.TextBox1.Text
Range("d1").Value = str
Range("d1").Copy

End Sub

The purpose of this is to copy the code from the textbox and paste
into a medical application called Road Notes. The code works fine for
copying and pasting with control V to another cell or a Word document;
but control V will not paste it into Road Notes. I would tend to
think that there was some Windows compatibility issue with Road Notes,
but, if I click on the textbox, then control A, then control C, then
switch to the applicable entry field in Road Notes, control V pastes
the text fine.

What is the difference between copying the text from a cell for
subsequent pasting and putting the text on the clipboard with control
C for subsequent pasting?

Thanks

Ken
 
Reply With Quote
 
 
 
 
Mike S
Guest
Posts: n/a
 
      12th Sep 2010
On 9/11/2010 8:12 PM, Ken wrote:
> I have a worksheet with several textboxes and command buttons next to
> them. The buttons have the following code:
> Private Sub CommandButton1_Click()
> Dim str As String
> str = ActiveSheet.TextBox1.Text
> Range("d1").Value = str
> Range("d1").Copy
> End Sub
>
> The purpose of this is to copy the code from the textbox and paste
> into a medical application called Road Notes. The code works fine for
> copying and pasting with control V to another cell or a Word document;
> but control V will not paste it into Road Notes. I would tend to
> think that there was some Windows compatibility issue with Road Notes,
> but, if I click on the textbox, then control A, then control C, then
> switch to the applicable entry field in Road Notes, control V pastes
> the text fine.
>
> What is the difference between copying the text from a cell for
> subsequent pasting and putting the text on the clipboard with control
> C for subsequent pasting?
>
> Thanks
>
> Ken


Using The Clipboard In VBA

http://www.cpearson.com/excel/clipboard.htm
 
Reply With Quote
 
Mike S
Guest
Posts: n/a
 
      12th Sep 2010
On 9/11/2010 10:51 PM, Mike S wrote:
> On 9/11/2010 8:12 PM, Ken wrote:
>> I have a worksheet with several textboxes and command buttons next to
>> them. The buttons have the following code:
>> Private Sub CommandButton1_Click()
>> Dim str As String
>> str = ActiveSheet.TextBox1.Text
>> Range("d1").Value = str
>> Range("d1").Copy
>> End Sub
>>
>> The purpose of this is to copy the code from the textbox and paste
>> into a medical application called Road Notes. The code works fine for
>> copying and pasting with control V to another cell or a Word document;
>> but control V will not paste it into Road Notes. I would tend to
>> think that there was some Windows compatibility issue with Road Notes,
>> but, if I click on the textbox, then control A, then control C, then
>> switch to the applicable entry field in Road Notes, control V pastes
>> the text fine.
>>
>> What is the difference between copying the text from a cell for
>> subsequent pasting and putting the text on the clipboard with control
>> C for subsequent pasting?
>>
>> Thanks
>>
>> Ken

>
> Using The Clipboard In VBA
>
> http://www.cpearson.com/excel/clipboard.htm


Here's one more that may help:

http://word.mvps.org/FAQs/MacrosVBA/...eClipboard.htm
 
Reply With Quote
 
Ken
Guest
Posts: n/a
 
      12th Sep 2010

Thanks Mike. I have gotten a lot of great stuff from Chip's site
before. This is another.
Ken

On Sep 12, 1:51*am, Mike S <ms...@yahoo.com> wrote:
> On 9/11/2010 8:12 PM, Ken wrote:
>
>
>
>
>
> > I have a worksheet with several textboxes and command buttons next to
> > them. *The buttons have the following code:
> > Private Sub CommandButton1_Click()
> > * Dim str As String
> > * str = ActiveSheet.TextBox1.Text
> > * Range("d1").Value = str
> > * Range("d1").Copy
> > End Sub

>
> > The purpose of this is to copy the code from the textbox and paste
> > into a medical application called Road Notes. *The code works fine for
> > copying and pasting with control V to another cell or a Word document;
> > but control V will not paste it into Road Notes. *I would tend to
> > think that there was some Windows compatibility issue with Road Notes,
> > but, if I click on the textbox, then control A, then control C, then
> > switch to the applicable entry field in Road Notes, control V pastes
> > the text fine.

>
> > What is the difference between copying the text from a cell for
> > subsequent pasting and putting the text on the clipboard with control
> > C for subsequent pasting?

>
> > Thanks

>
> > Ken

>
> Using The Clipboard In VBA
>
> http://www.cpearson.com/excel/clipboard.htm- Hide quoted text -
>
> - Show quoted text -


 
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 then Past Text into TextBox not working RyanH Microsoft Excel Programming 4 19th Mar 2008 10:33 AM
Copy TextBox Text =?Utf-8?B?QmVueg==?= Microsoft Excel Programming 2 22nd Feb 2007 04:03 PM
Copy text from TextBox David Dvali Microsoft C# .NET 2 11th May 2005 09:14 PM
copy text in textbox to another textbox on click leon Microsoft Access Form Coding 3 30th Mar 2005 04:47 PM
how to copy text from a TextBox to the clipboard ? =?Utf-8?B?b2Zpcg==?= Microsoft Access Form Coding 1 16th Oct 2004 02:05 PM


Features
 

Advertising
 

Newsgroups
 


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