I have a listbox (DisplayQrylb) and I want to be able to copy it's contents to the clipboard. And I tried this bit of code in onclick event:
It works with "some text for clipboard" inplace of =DisplayQrylb
Code:
Set objCP = CreateObject("HtmlFile")
objCP.ParentWindow.ClipboardData.SetData "text", =DisplayQrylb
It works with "some text for clipboard" inplace of =DisplayQrylb