I've managed to get this code started, but am finding difficulty seeing what's going on here. The message box never occurs when the inputbox input is "". The selection delete part works, but anything past that does not execute. I've made several attempts at restructuring the if not to if else, but nothing seems to stick. Any wisdom here? Much appreciated.
Code:
Public Sub Process()
On Error Resume Next
Set wb = ThisWorkbook
Set ws = wb.Sheets(2)
With ws
.Range("A2").Select
On Error GoTo 0
Set xRg = Application.InputBox("Please select the first survey after landing (and/or casing) depth:", "Select", xTxt, , , , , 8)
If Not xRg Is Nothing Then
xRg.Offset(1, 0).Select
Rows(ActiveCell.Row & ":" & Rows.Count).Delete
End If '\\\\\\bust - routine exits here
If xRg = "" Then
MsgBox "No processing occurred.", vbInformation, "Exit"
Exit Sub
End If
End With
Call Export 'evidence of call not run
ws.Delete 'evidence of ws is not deleted
End Sub