I want to show error message & delete the content entered in A2; when Range A1 is blank & User enter value in A2
i try below code but its not working properly. it went in loop.
and is there any way where i can hide multiple rows in single line statement
like Union(Rows("3:4"),Rows("9:10").....
i will appreciate any help on this
Code:Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$2" And Range("A1").Value = "" Then Temp = MsgBox("Error: ", vbInformation, "Warning") Range("A2").ClearContents Range("A1").Select End If End Sub




Reply With Quote
Bookmarks