.PutInClipboard

U

USH

hELLo EVERYBODY !!
I found this sub on some useful site..
she makes all it's expected from her..
( copy a value to clipboard that will be pasted to an external program
with a mouse macro..)
now everything is working well..
but i don't understand the suggestion in the commented block...
nor if and what i have to do about. tx ! paolo

Sub CopytoClipboard()
' Requires a reference to Microsoft Forms Object Library
' An easy way to do this is to add and then delete a form;
' the reference will persist
With New DataObject
.SetText ActiveCell.Value
.PutInClipboard
End With
End Sub
 
D

Dave Peterson

Open Excel
Open your workbook
Go into the VBE
Show the project explorer
Select your workbook's project
Click on Tools|References and check that "microsoft forms object library"

If that reference were already checked, then you didn't need to do it! But if
it wasn't checked, then you had to do it.

Back to excel and save your workbook.

Just a reference to keep (add it as a comment in your code):

Chip Pearson's site:
http://www.cpearson.com/excel/Clipboard.aspx

It's where I would start if I had questions about using the clipboard in code.
 
U

USH

...quite..
the cpu transformed in a golem of silicium and eated my head..
im writing to you from the afterlife !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top