lior03
01-03-2006, 08:42 AM
hello
the following macro suppose to select an empty cell in a selection.if i choose a range without a empty cell i get an error (number 1004).what could be doen to prevent the error message?.is it possible to tell excel
that if the error number is so $ so then let an msgbox appear?
thanks
Sub clicko()
Selection.SpecialCells(xlCellTypeBlanks).Select
If Err.number = 1004 Then
MsgBox "no cell found"
End If
End Sub
the following macro suppose to select an empty cell in a selection.if i choose a range without a empty cell i get an error (number 1004).what could be doen to prevent the error message?.is it possible to tell excel
that if the error number is so $ so then let an msgbox appear?
thanks
Sub clicko()
Selection.SpecialCells(xlCellTypeBlanks).Select
If Err.number = 1004 Then
MsgBox "no cell found"
End If
End Sub