When clicking an object, trying to get that object to copy some text, I want to get the computer to use the windows shortcut "CTRL-C". How would I get the computer to do this? Is there a better way? I tried using the ascii codes to activate it, but this doesn't seem to work.
Comments
:
Im a little confused but try the Sendkeys statment
SendKeys "^C" 'Sends Ctrl-C
:
Im a little confused but try the Sendkeys statment
SendKeys "^C" 'Sends Ctrl-C
Simon Thwaites - IT Consultant
Simon@fhdale.co.uk
Simon@vbsnippets.co.uk
:
Easiest way is to use the [blue]Clipboard[/blue] object. The object contains methods that allow you to write/read data on the windows clipboard.
For example, say you have a textbox (Text1) with some text in it that you want to copy:
[blue]Clipboard.SetText Text1.Text[/blue]
That's it...
In addition the clipboard object allows you to read/write RTF, DDE, BMP/DIB, WMF, and color palette info on the windows clipboard.
Look it up in your on-line help for all the methods and syntaxing.
~Mike