ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy text then Past Text into TextBox not working (https://www.excelbanter.com/excel-programming/407813-copy-text-then-past-text-into-textbox-not-working.html)

RyanH

Copy text then Past Text into TextBox not working
 
How can I copy text from another application (Microsoft Word) and then paste
it into a UserForm Textbox?

Thanks in Advance,
Ryan

Nigel[_2_]

Copy text then Past Text into TextBox not working
 
Put cursor in textbox and press Ctrl V

--

Regards,
Nigel




"RyanH" wrote in message
...
How can I copy text from another application (Microsoft Word) and then
paste
it into a UserForm Textbox?

Thanks in Advance,
Ryan



Jean-Yves[_4_]

Copy text then Past Text into TextBox not working
 
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


RyanH

Copy text then Past Text into TextBox not working
 
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


Jean-Yves[_4_]

Copy text then Past Text into TextBox not working
 
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



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com