Hi,

I need a macro that asks the user to select a row and use this row in the macro. The idea is that when the user does not select a row or column A is empty for the selected row, the macro will stop running. I have written this code, which does not work:


Dim Regel As Integer
Regel = Application.InputBox(prompt:="Selecteer een rij", Type:=1)

If Regel = False Or Cells(Regel, A) = "" Then
MsgBox "Geen regel geselecteerd."
Exit Sub


Else
Sheets("Sheet 2").Select
Range("A1").Value = Regel
Can anyone help me?