i am posting an activex dll to simplify the clipboard usage for vba or any script language without clipboard object
hope it may be useful to someone
usage add a reference or createobject("clipbrd.clipboard")
has same methods as vb6 clipboard object
.settext text : returns boolean, true on success
.gettext : returns string
.clear : returns boolean
.setdata object, format : format is optional clipboard format, returns boolean
.getdata(format) : returns object
format parameter is optional and should be a clipboard constant value
Last edited by westconn1; Oct 13th, 2009 at 09:33 PM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread "Resolved", if the query is solved Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ MyGear:
ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread "Resolved", if the query is solved Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ MyGear:
ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011
I have a question: I tried it in powerpoint but I can't copy shapes.
If I use the native .copy from powerpoint then I can use the getdata from the dll without any problem. However, the setdata on shapes doesn't put anything in the clipboard and the error message is "wrong format". So if I can't use it to copy shapes to the clipboard, what type of objects can I copy with setdata???
Thank you.
Hi, this looks exactly like what i need, can you tell me how to register the dll and where to save it? many thanks in advance
David
Originally Posted by westconn1
i am posting an activex dll to simplify the clipboard usage for vba or any script language without clipboard object
hope it may be useful to someone
usage add a reference or createobject("clipbrd.clipboard")
has same methods as vb6 clipboard object
.settext text : returns boolean, true on success
.gettext : returns string
.clear : returns boolean
.setdata object, format : format is optional clipboard format, returns boolean
.getdata(format) : returns object
format parameter is optional and should be a clipboard constant value
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Hello, I am sorry to revive this dead thread, but I have used this DLL file on my application.. It works amazing on a 32-bit environment.. However some of my users are using a 64 bit version, in which I keep getting the error..
'Where AltPrintScreen is a Custom function to capture the active screen..
SavePicture myClip.getData(vbCFBitmap), savePath
exitOnErr:
ExitSub
errHandler:
Resume exitOnErr
EndSub
but no avail.. So I just wanted to know is there a 64 bit equivalent of the same? If not can I please see the VBA code?
Just to add more info, I have Registered the DLL (using Admin mode) under the C:/Windows/SysWOW64.. I have tried it several times.. I just cannot overcome this error.. Am I doing something wrong? I hope not, as it works great on 32-bit. Would appreciate any help.
i will look into it shortly
i have only recently got w7 x64, so could not try out before
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Thank you so much.. I really appreciate it.. Most of the code I found does not seem to work on the 64-bit environment.. A real pain with two different versions..
Hello Pete, I forgot to post my solution.. After much trial, I finally managed to crack it.. However I did not use the 'Clipboard.DLL'.. I had to create my own code, by using various resources found online I was able to achieve this..
sorry i did not get back to you, i intended to find the source code, but so far have not looked for it at all
glad you managed to find some solution
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
That's okay Pete, but if you do find the code I would be happy to look at it.. Having a library function will look more neat.. Would appreciate if you could..
having finally got around to testing, i found that this dll works fine on w7 64 bit, as long as it is registered correctly
must be done from an elevated command prompt, otherwise registration fails with error
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
run msdos prompt, by right click > run as administrator
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
→ The Comprehensive Guide to Cloud Computing
A complete overview of Cloud Computing focused on what you need to know, from selecting a platform to choosing a cloud vendor.