K
Klemen25
Hello
How to make my basic macro to exit inputbox on 'cancel'?
Sub Fill_blanks()
Dim myRange As Range
Set myRange = Application.InputBox(Prompt:="x.", Title:="y", Type:=8)
myRange.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Exit Sub
End Sub
I tried with:
If Err.Number = 424 Then
Exit Sub
End If
If myRange = False
Exit Sub
End If
Thank you as allways!
How to make my basic macro to exit inputbox on 'cancel'?
Sub Fill_blanks()
Dim myRange As Range
Set myRange = Application.InputBox(Prompt:="x.", Title:="y", Type:=8)
myRange.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Exit Sub
End Sub
I tried with:
If Err.Number = 424 Then
Exit Sub
End If
If myRange = False
Exit Sub
End If
Thank you as allways!