Private Sub CommandButton1_Click()
Dim amount As Variant
amount = “”
‘*************Implementation 1**************************
Do
amount = InputBox(“Please enter the Product Code”)
Cells(1, 2).Value = amount
Loop Until amount <> “”
‘*************Implementation 2**************************
Do
amount = InputBox(“Please enter the Product Code”)
Cells(1, 2).Value = amount
Loop While amount <> “”
‘**************Implementation 3*************************
amount = InputBox(“Please enter the Product Code”)
Do While amount <> “”
amount = InputBox(“Please enter the Product Code”)
Cells(1, 2).Value = amount
Loop
End Sub
VBA code-
Private Sub CommandButton1_Click()
Dim amount As Variant
amount = “”
Do
amount = InputBox(“Please enter the Product Code”)
Cells(1, 2).Value = amount
Loop While amount <> “”
End Sub
Screenshot-

Thanks and Regards,
Vinay Prakash Singh