Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting Rows With Non-Needed Data between Needed Data | Excel Worksheet Functions | |||
Help needed | Excel Discussion (Misc queries) | |||
help needed | Excel Worksheet Functions | |||
Help needed... | Excel Discussion (Misc queries) | |||
xla/xls help needed! | Excel Programming |