MichiganWilliams
New Member
- Joined
- Jan 15, 2017
- Messages
- 12
Hello,
I'm not very experienced and have searched and read through tutorials. I've got a textbox2 on sheet2. It's a large textbox with a lot of text that may get entered.
Not everyone that uses this will be tech savvy (to select, ctrl C themselves) so I created a command button to copy the text from the textbox to the clipboard (see below). However, when I paste the contents of the clipboard into notepad or word or any other application, only the first 1023 characters from the textbox actually got put in the clipboard. Am I missing something obvious?
I tried a few other methods of copying to the clipboard but none of them were copying any text to the clipboard. I couldn't figure out what I was doing wrong... Like the following (no errors, just nothing gets copied)
Thanks for your help.
I'm not very experienced and have searched and read through tutorials. I've got a textbox2 on sheet2. It's a large textbox with a lot of text that may get entered.
Not everyone that uses this will be tech savvy (to select, ctrl C themselves) so I created a command button to copy the text from the textbox to the clipboard (see below). However, when I paste the contents of the clipboard into notepad or word or any other application, only the first 1023 characters from the textbox actually got put in the clipboard. Am I missing something obvious?
Code:
Private Sub CommandButton3_Click() Application.SendKeys ("^c~")
InputBox "clipboard", , Sheets("Sheet2).TextBox2.Value
End Sub
I tried a few other methods of copying to the clipboard but none of them were copying any text to the clipboard. I couldn't figure out what I was doing wrong... Like the following (no errors, just nothing gets copied)
Code:
[COLOR=#101094][FONT=inherit]Private[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]Sub[/FONT][/COLOR][COLOR=#303336][FONT=inherit] CommandButton3_Click[/FONT][/COLOR][COLOR=#303336][FONT=inherit]()[/FONT][/COLOR]<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">[COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]Dim[/FONT][/COLOR][COLOR=#303336][FONT=inherit] MyData [/FONT][/COLOR][COLOR=#101094][FONT=inherit]As[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]New[/FONT][/COLOR][COLOR=#303336][FONT=inherit] DataObject
MyData[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]SetText TextBox2[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Text
MyData[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]PutInClipboard [/FONT][/COLOR]</code>[COLOR=#101094][FONT=inherit]End[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]Sub[/FONT][/COLOR]
Thanks for your help.