⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vba11-6.txt

📁 AO的原代码,都是以TXT的文件写的,对你肯定有帮助的.这些都是 我的心血啊.
💻 TXT
字号:
Public Sub UseGetStringDialog()
  Dim pGetStringDialog As IGetStringDialog
  Dim pMessageDialog As IMessageDialog
  Dim blnOK As Boolean
  Dim blnYes As Boolean
  Dim strName As String
  
  ' Initiate the variables and objects
  strName = "Bob"
  blnYes = False
  Set pGetStringDialog = New GetStringDialog
  Set pMessageDialog = New MessageDialog
  
  ' Place the process in a loop so that
  ' it can be repeated.
  Do While Not blnYes
    ' Display the Get String Dialog.
    blnOK = pGetStringDialog.DoModal( _
    "Get String Dialog Example", "Name:", strName, 0)
    If blnOK Then
      ' Get the name that user provided.
      strName = pGetStringDialog.Value
      ' Display the Message Dialog.
      blnYes = pMessageDialog.DoModal( _
      "Message Dialog Example", _
      "Is your name " & strName & "?", _
      "Yes", "No", 0)
    Else
      ' User selected the Cancel button,
      ' end the macro.
      Exit Do
    End If
  Loop
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -