pdqsasse
03-23-2003, 03:46 PM
Can anyone tell me how to temporarily disable an event. I want a sheets 'change' even to clear all the data on that sheet if certain criteria are not meet, however doing so starts the sheets change event again. I need to prevent this from happening. Thank you.
Or if you can tell me an easier way for to cause something to happen only after a user has pasted information into cell A1, that would be great. Here is what I have
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("a1").Value <> Empty Then
MsgBox "Thank you"
Worksheets("Hours").Visible = True
Else
MsgBox "you must paste to cell A1 only, thank you"
Cells.Value = ""
Range("a1").Activate
End If
End Sub
Or if you can tell me an easier way for to cause something to happen only after a user has pasted information into cell A1, that would be great. Here is what I have
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("a1").Value <> Empty Then
MsgBox "Thank you"
Worksheets("Hours").Visible = True
Else
MsgBox "you must paste to cell A1 only, thank you"
Cells.Value = ""
Range("a1").Activate
End If
End Sub