作者iwantlucky (我要幸运)
看板Visual_Basic
标题Re: [VBA ] 请教INPUTBOX搭配回圈的问题
时间Thu Mar 2 14:40:07 2017
谢谢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
加上自动跳行
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 118.163.138.127
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Visual_Basic/M.1488436813.A.864.html