Below Code is giving me the message of Blank cells in dynamical range. I want to replace all blank cells with "0".
Note - Range should be dynamic on the basis of A2 to last column as per Data and A2 to last Row as per Data .it is not fixed.
Sub Blank_Cell_Alert()
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Name = "MyRange"
ActiveSheet.Name = "MySheet"
If Range("MyRange").SpecialCells(xlCellTypeBlanks).Count > 0 Then
MsgBox ("Please Enter all Employee Data Before you Attempt to Update this Table."), vbCritical, "Incomplete Data!"
Cancel = True
End If
End Sub
Note - Range should be dynamic on the basis of A2 to last column as per Data and A2 to last Row as per Data .it is not fixed.
Sub Blank_Cell_Alert()
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Name = "MyRange"
ActiveSheet.Name = "MySheet"
If Range("MyRange").SpecialCells(xlCellTypeBlanks).Count > 0 Then
MsgBox ("Please Enter all Employee Data Before you Attempt to Update this Table."), vbCritical, "Incomplete Data!"
Cancel = True
End If
End Sub