PC Review


Reply
Thread Tools Rate Thread

Copy text then Past Text into TextBox not working

 
 
RyanH
Guest
Posts: n/a
 
      17th Mar 2008
How can I copy text from another application (Microsoft Word) and then paste
it into a UserForm Textbox?

Thanks in Advance,
Ryan
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      17th Mar 2008
Put cursor in textbox and press Ctrl V

--

Regards,
Nigel
(E-Mail Removed)



"RyanH" <(E-Mail Removed)> wrote in message
news:C446D48E-B3A4-4A09-A70B-(E-Mail Removed)...
> How can I copy text from another application (Microsoft Word) and then
> paste
> it into a UserForm Textbox?
>
> Thanks in Advance,
> Ryan


 
Reply With Quote
 
Jean-Yves
Guest
Posts: n/a
 
      17th Mar 2008
Voila

Dim daoStr As DataObject
Dim strCB As String, strTemp As String
Set daoStr = New DataObject
daoStr.GetFromClipboard
strCB = daoStr.GetText
textbox1=strCB

HTH
--
Regards

Jean-Yves Tfelt
Europe


"RyanH" wrote:

> How can I copy text from another application (Microsoft Word) and then paste
> it into a UserForm Textbox?
>
> Thanks in Advance,
> Ryan

 
Reply With Quote
 
RyanH
Guest
Posts: n/a
 
      17th Mar 2008
Nigel,

Ctrl-V seems to work. Is there a way to right click then select Paste?

Jean-Yves,

Where do I place this code? Do I have to do this for every textbox?

Thanks
Ryan

"Jean-Yves" wrote:

> Voila
>
> Dim daoStr As DataObject
> Dim strCB As String, strTemp As String
> Set daoStr = New DataObject
> daoStr.GetFromClipboard
> strCB = daoStr.GetText
> textbox1=strCB
>
> HTH
> --
> Regards
>
> Jean-Yves Tfelt
> Europe
>
>
> "RyanH" wrote:
>
> > How can I copy text from another application (Microsoft Word) and then paste
> > it into a UserForm Textbox?
> >
> > Thanks in Advance,
> > Ryan

 
Reply With Quote
 
Jean-Yves
Guest
Posts: n/a
 
      19th Mar 2008
Hi Ryan,


If this is for multiple textboxes, then better stick to keyboard comands.
The code I showed you should be used for one textbox only. I used a
comanddbutton
Or you have to trace which control has the focus.If Interested, google on
traceFocus.
--
Regards

Jean-Yves Tfelt
Europe


"RyanH" wrote:

> Nigel,
>
> Ctrl-V seems to work. Is there a way to right click then select Paste?
>
> Jean-Yves,
>
> Where do I place this code? Do I have to do this for every textbox?
>
> Thanks
> Ryan
>
> "Jean-Yves" wrote:
>
> > Voila
> >
> > Dim daoStr As DataObject
> > Dim strCB As String, strTemp As String
> > Set daoStr = New DataObject
> > daoStr.GetFromClipboard
> > strCB = daoStr.GetText
> > textbox1=strCB
> >
> > HTH
> > --
> > Regards
> >
> > Jean-Yves Tfelt
> > Europe
> >
> >
> > "RyanH" wrote:
> >
> > > How can I copy text from another application (Microsoft Word) and then paste
> > > it into a UserForm Textbox?
> > >
> > > Thanks in Advance,
> > > Ryan

 
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 & past text every30th Row into new sheet bburden752 Microsoft Excel Programming 1 30th May 2011 04:35 PM
Copy and Past Values AND Formatting AND Text KKD Microsoft Excel Misc 1 6th May 2010 06:25 PM
how to convert slides to text without copy/past? =?Utf-8?B?bW1hZ2Q=?= Microsoft Powerpoint 2 4th Feb 2006 08:21 PM
Find Text from textBox then past what is found on sheet1 =?Utf-8?B?TWFyayBDb3Zlcg==?= Microsoft Excel Programming 1 5th Oct 2005 04:58 PM
copy text in textbox to another textbox on click leon Microsoft Access Form Coding 3 30th Mar 2005 04:47 PM


Features
 

Advertising
 

Newsgroups
 


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