moogthemoog
Board Regular
- Joined
- Nov 17, 2004
- Messages
- 51
Hi
I have some VBA code that basically checks if there's an error message in cell M58, then display a Command Button "ClearError1"
(note that this code is in the individual sheet, not ThisWorkbook)
If ClearError1 button is clicked, it runs some code to clear the error:
In Excel 2007, the Worksheet_Calculate code had the unintended effect of not keeping Copied items in the clipboard (i.e. I could copy and paste once and the clipboard was cleared). This was a bit of a pain, but not the end of the world.
However, in Excel 2010, the code is now having the extra effect of clearing the Undo button (i.e. Undo is not available within Excel). This is a major pain to productivity.
Is there any code that can stop this, or is there an alternate code to displaying or not displaying a Command button which doesn't clear out the Clipboard/Undo memory?
Or, is there an alternative to the Command Button?
Thanks
Jon
I have some VBA code that basically checks if there's an error message in cell M58, then display a Command Button "ClearError1"
Code:
Private Sub Worksheet_Calculate()
On Error Resume Next
If IsError(Range("M58").Value) Then ClearError1.Visible = True 'Else ClearError1.Visible = False
End Sub
If ClearError1 button is clicked, it runs some code to clear the error:
Code:
Private Sub ClearError1_Click()
Call GetSheetNames
End Sub
In Excel 2007, the Worksheet_Calculate code had the unintended effect of not keeping Copied items in the clipboard (i.e. I could copy and paste once and the clipboard was cleared). This was a bit of a pain, but not the end of the world.
However, in Excel 2010, the code is now having the extra effect of clearing the Undo button (i.e. Undo is not available within Excel). This is a major pain to productivity.
Is there any code that can stop this, or is there an alternate code to displaying or not displaying a Command button which doesn't clear out the Clipboard/Undo memory?
Or, is there an alternative to the Command Button?
Thanks
Jon