Using an Application's Built-in Dialog Boxes from VBA: wdDialogFileOpen : Dialogs « Application « VBA / Excel / Access / Word






Using an Application's Built-in Dialog Boxes from VBA: wdDialogFileOpen

 
Sub box()
  If Documents.Count = 0 Then
      Proceed = MsgBox("no document.Please open a document.", vbOKCancel + vbExclamation, "Format Report")
      If Proceed = vbOK Then
          Dialogs(wdDialogFileOpen).Show
          If Documents.Count = 0 Then End
      Else
          End
      End If
  End If
End Sub

 








Related examples in the same category

1.Set the contents of the File Name text box in the Save As dialog box in Word and then display the dialog box
2.Returning the Button the User Chose in a Dialog Box
3.cancel a procedure if the user clicked the Cancel button in a dialog box:
4.Specifying a Timeout for a Dialog Box
5.Display one of Excel's built-in dialog boxes and let the user make the choices: by using the Application object's Dialogs property.
6.To display Excel's Open dialog box