Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default GetFromClipboard help needed please

I want to copy the content of a TextBox and paste it to Notepad.
I have the first piece working, I'm opening Notepad but I can't paste it. I
don't want to use SendKeys (Ctrl+V).

This is what I have


Private Sub CommandButton4_Click()

Dim MsgToNotepad
Dim DataObj As New MSForms.DataObject
Dim WshShell

Me.TxtMessage.SelStart = 0
Me.TxtMessage.SelLength = Me.TxtMessage.TextLength
Set MsgToNotepad = Me.TxtMessage 'selects multiline textbox contents
MsgToNotepad.Copy 'copies it to Clipboard

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "Notepad" 'runs Notepad

Dim IntoNotepad As String 'gets it from clipboard and pasts it into Notepad
MsgToNotepad.GetFromClipboard
IntoNotepad = MsgToNotepad.GetText

End Sub



THANKS IS ADVANCE

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
Deleting Rows With Non-Needed Data between Needed Data Daren Excel Worksheet Functions 2 September 30th 08 06:47 PM
Help needed [email protected] Excel Discussion (Misc queries) 0 June 5th 07 01:14 PM
help needed cward1 Excel Worksheet Functions 1 September 28th 06 01:47 PM
Help needed... l.o.c.o.s Excel Discussion (Misc queries) 9 February 5th 06 03:49 AM
xla/xls help needed! MattShoreson[_10_] Excel Programming 1 January 13th 04 09:24 PM


All times are GMT +1. The time now is 06:26 PM.

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

About Us

"It's about Microsoft Excel"