Hi,
I am setting up a worksheet that contains some vba functions and among them, I wrote a code with Worksheet_change in order to call up a userform if the cell value in the target changes to 'sent'. Here is my code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D531")) Is Nothing Then
Select Case Target.Cells.Value
Case "Sent"
OrderSentTime_userform.Show
End Select
Else
Unload OrderSentTime_userform
Exit Sub
End If
End Sub
The code works perfectly on its own. However, it doesn't when i fit it into the whole worksheet code, especially when i run another code that trying to clear the content of selected rows. And the error has been referred to the (case "Sent") as above. I couldn't figure out the reason for that. Could you please advice what's wrong to the code?
Apologies if my explanation isn't clear enough, but i hope my sample worksheet attached help better.
Thank you.
xwxc




31")) Is Nothing Then
Reply With Quote