I'm trying to create a command button that will copy preset data to clipboard. However, it needs to contain both a String and an Object. For example:
___________
This is the information you requested:
__________
Seems like I've tried everything under the Sun but, no luck. Here's as close as I can get:
Private Sub CommandButton32_Click()
Dim grD As Object
Set grD = Worksheets("TMP").Range("A1:B2")
Dim MyData As New DataObject
MyData.SetText "This is the information you requested:" & Chr(10) & grD
MyData.PutInClipboard
End Sub
If anyone can offer a solution, it would be greatly appreciated.
___________
This is the information you requested:
PART | DESCRIPTION |
3735151 | BATTERY |
Seems like I've tried everything under the Sun but, no luck. Here's as close as I can get:
Private Sub CommandButton32_Click()
Dim grD As Object
Set grD = Worksheets("TMP").Range("A1:B2")
Dim MyData As New DataObject
MyData.SetText "This is the information you requested:" & Chr(10) & grD
MyData.PutInClipboard
End Sub
If anyone can offer a solution, it would be greatly appreciated.