改成这样
Select Case e.Col.Name Case "第一列" Dim Val As Integer If InputValue(Val, "更新物品数量", "请输入物品数量:") Then e.Row("第一列") = val End If e.cancel = trueEnd Select