Olwa
06-29-2017, 11:36 PM
Hi there,
i want to delete a row (lindex) and exit sub as the user cancels the inputbox. Tried different versions like the following, but nothing seemed to work. Any suggestions?
text = Application.InputBox("Do something!")
If StrPtr(text) = 0 Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
text = Application.InputBox("Do something!")
If text = 0 Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
text = Application.InputBox("Do something!")
If text = "" Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
text = Application.InputBox("Do something!")
If text = vbNullString Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
i want to delete a row (lindex) and exit sub as the user cancels the inputbox. Tried different versions like the following, but nothing seemed to work. Any suggestions?
text = Application.InputBox("Do something!")
If StrPtr(text) = 0 Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
text = Application.InputBox("Do something!")
If text = 0 Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
text = Application.InputBox("Do something!")
If text = "" Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If
text = Application.InputBox("Do something!")
If text = vbNullString Then
Rows(lIndex).EntireRow.Delete
Exit Sub
End If