In Need of Code to clear the Clipboard

  • Thread starter Thread starter DanF
  • Start date Start date
D

DanF

Guest
I need to create module (or Macro) which when run will clear the Access clipboard of any data it may currently be holding.

If anyone knows this code or how to go about creating it it would be much appreciated.

DanF
 
This code is from a sample mdb created by Candace Tripp. The database is on her website (http://home.earthlink.net/~ctripp1/)

Private Sub cmdClear_Click()
On Error GoTo Err_cmdClear_Click

Dim fOK As Boolean

fOK = ClearClipboardData_clt()

If Not fOK Then
MsgBox "Error: Could not empty the Clipboard."
Else
MsgBox "The Clipboard has been cleared."
End If


Exit_cmdClear_Click:
Exit Sub

Err_cmdClear_Click:
MsgBox Err.Description
Resume Exit_cmdClear_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom