Good Afternoon,
Been using the following code for years to clear the clipboard and it worked like a champ, until recently it won't work from a network drive or as an email attachment. This file works with both Excel 2010 and 2016
I get this error: Run-time error '435':
Can't find DLL entry point OpenClipboard in user32
CODE:
Option Explicit
Private Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Private Declare PtrSafe Function EmptyClipboard Lib "user32" () As Long
Private Declare PtrSafe Function CloseClipboard Lib "user32" () As Long
Public Function ClearClipboard()
OpenClipboard (0&) 'IT BOMBS OUT ON THIS LINE WHEN FILE IS RUN OFF NETWORK DRIVE OR AS EMAIL ATTACHMENT.
EmptyClipboard
CloseClipboard
End Function
Sub ccc()
Call ClearClipboard
End Sub
Please Help!! - Thank U in Advance
Been using the following code for years to clear the clipboard and it worked like a champ, until recently it won't work from a network drive or as an email attachment. This file works with both Excel 2010 and 2016
I get this error: Run-time error '435':
Can't find DLL entry point OpenClipboard in user32
CODE:
Option Explicit
Private Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Private Declare PtrSafe Function EmptyClipboard Lib "user32" () As Long
Private Declare PtrSafe Function CloseClipboard Lib "user32" () As Long
Public Function ClearClipboard()
OpenClipboard (0&) 'IT BOMBS OUT ON THIS LINE WHEN FILE IS RUN OFF NETWORK DRIVE OR AS EMAIL ATTACHMENT.
EmptyClipboard
CloseClipboard
End Function
Sub ccc()
Call ClearClipboard
End Sub
Please Help!! - Thank U in Advance