7/9/2023 0 Comments The lunchbox 2013 clip![]() Private Declare PtrSafe Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As LongPtr) As LongPtr ![]() If you find this useful, please vote his answer up. UPDATE and EDIT: Code below has been corrected and now works properly in 64-bit Excel, thanks to Jason Kurtz' answer below. (I am using Windows 8, so I cannot use Microsoft Forms or the Data Object to manipulate the clipboard. Can someone help me test and troubleshoot?Īfter pasting the code below into a code module in VBA, you can test it in the immediate windows by typing Clipboard_SetData("Copy this to the clipboard.") and it should set that text on the clipboard and you would be able to paste it into any other application. Below is some code that does not error, but it is also not setting any text on the clipboard. But ever since upgrading to 64-bit Office 2013, I cannot. I used to be able to use Windows API calls in Excel VBA to set text on the clipboard.
0 Comments
Leave a Reply. |