Code Script

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Browse For File Dialogue Box

Vbscript / User Interaction / Browse For File Dialogue Box

Uses the Windows explorer browse file dialogue box to select a file. The explorer view can limit the types of file displayed for selection.

Set objDialog = CreateObject("UserAccounts.CommonDialog")

objDialog.Filter = "All Folders|*.*"
objDialog.InitialDir = "C:"
intResult = objDialog.ShowOpen
If intResult = 0 Then
    Wscript.Echo objDialog.FileName
End If

Please note that a disclaimer applies to any code on this page.
  Go Back
  Print Page

- Links
- Reference
- Script Editors
- Tutorials
- Vbscript
     - Active Directory
     - Exchange
     - Files And Folders
     - General
     - Ms Office
     - Operating System
     - Processes And Services
     - Text Processing
     - User Interaction
          - Browse For File Dialogue Box
          - Browse For Folder Dialogue Box
          - Convert Byte Value To Kb-mb-gb-tb
          - Copy Text To Clipboard
          - Select Option Popup Dialogue
     - Web Servers