Hi to all of you,
Could anyone please direct me in the right direction and tell me what is wrong with my code. It does not work. Feel free to call me an idiot.! LOL
Code
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyObject As Object ' Create object variable.
Set MyObject = UserForm2
Application.EnableEvents = False[/TR]
'On Error Resume Next
If Not Application.Intersect(Range("A2"), Range("A10")) Is Nothing Then Exit Sub
'On Error Resume Next
[COLOR=#ff0000]If Target.Application.Intersect(Range("A2"), Range("A10")).Value = "" Then [/COLOR][COLOR=#0000cd]' the procedure stops here[/COLOR][COLOR=#ff0000][/COLOR][COLOR=#ff0000][/COLOR]
UserForm1.Hide
ElseIf Target.Application.Intersect(Range("A2"), Range("A10")).Value <> "" Then
Sheet1.Shapes("Button 1").Visible = msoFalse
Sheet3.Range("C8:C9").ClearContents
UserForm1.Show
End If
Application.EnableEvents = True
End Sub
Display More
Any help would be most welcome,
Thanks.