VB6中判断用户是否按下了InputBox的取消按钮

来源:互联网 发布:sqlserver导出单个表 编辑:程序博客网 时间:2024/06/03 02:35

(声明:魏滔序原创,转贴请注明出处。)
Private Sub Command1_Click()
    Dim str As String
    Dim Cancel As Boolean
    str = InputBox("")
    Cancel = Not CBool(StrPtr(str))
    MsgBox Cancel
End Sub 

原创粉丝点击