Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Boston, Massachusetts, USA
    Thanked 0 Times in 0 Posts

    code to clear clipboard (excel 2000)

    Is it possible to write a macro that clears the clipboard? If so, is it possible for that macro to run everytime the active workbook is deactivated? Please help!!!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: code to clear clipboard (excel 2000)

    The following instruction will clear the Excel clipboard:

    Application.CutCopyMode = False

    If you want to clear the clipboard every time a specific workbook is deactivated, write an event handler for the Workbook_Deactivate event.
    In the Visual Basic Editor, double click the ThisWorkbook object in the Project Explorer, and enter the following code:

    Private Sub Workbook_Deactivate()
    Application.CutCopyMode = False
    End Sub

    If you want to clear the clipboard whenever a workbook is deactivated, you must write an application level event handler in Personal.xls or in an add-in. Post back if that is what you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts