vba中,输入框点取消(或空时点确定)后,弹出对话框,点否或取消反回到输入框,如此循环,直到输入框中有值

2024-12-22 22:53:57
推荐回答(2个)
回答1:

Sub 删除重复行两者情况都有()
Dim i As Integer, x As Integer, y As Integer, z As String
Do
z = InputBox("请选择所要删除重复行的列")
If z = "" Then
If MsgBox("确定退出?", vbYesNoCancel + vbExclamation, "询问") = vbYes Then Exit Sub
End If
Loop While z = ""
'执行删除操作
End Sub

回答2:

修改过的。