謝謝lin0919解答我的疑惑
Sub ask()
Do
If MsgBox("add", vbYesNo) = vbYes Then
a = Cells(Rows.Count, 1).End(xlUp).Row
Range("a" & a).Offset(1, 0).Select
a = InputBox("name")
ActiveCell.Formula = a
b = Cells(Rows.Count, 2).End(xlUp).Row
Range("b" & b).Offset(1, 0).Select
b = InputBox("quantity")
ActiveCell.Formula = b
Else: Exit Do
End If
Loop
End Sub
加上自動跳行