Copy the contents of variable into clipboard
Hi ron,
I'm not sure how to understand what you have written below, but I think you
are on the right lines and understanding what I am trying to achieve.
I'm not too familiar with Class Modules, I find them a little confusing. Can
you write the code in full so that I can copy it to modules/class modules and
then I can follow what you are thinking?
Cheers,
Simka.
"ron" wrote:
On Oct 28, 10:59 am, Simka wrote:
Hi everyone,
My head has gone blank. I am trying to copy the contents of a variable into
the clipboard.
ie:
value in clipboard = MyVariable
Can someone please remind me?
Try the following...ron
Dim mystring As New DataObject
my_var= "assign something to the variable"
mystring.SetText my_var
mystring.PutInClipboard
ActiveSheet.PasteSpecial Format:="Text"
|