There is another solution I found interesting from MS TechNet less customization but gets what you wanted to achieve. This returns the full path of the selected file.
Set wShell=CreateObject("WScript.Shell") Set oExec=wShell.Exec("mshta.exe ""about:<input type=file id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""") sFileSelected = oExec.StdOut.ReadLine wscript.echo sFileSelected
Related Posts:
- What does <> mean?
- How to find a value in an excel column by vba code Cells.Find
- Check if a string contains another string
- Does VBA have Dictionary Structure?
- “Sub or Function not defined” when trying to run a VBA script in Outlook
- What is the function of FormulaR1C1?
- What exactly is the function of Application.CutCopyMode property in Excel
- VBA Excel – Insert row below with same format including borders and frames
- Deleting a file in VBA
- Excel VBA: Can’t get a match, error “Unable to get the Match property of the WorksheetFunction class”
- How to comment and uncomment blocks of code in the Office VBA Editor
- Run-time error ‘3061’. Too few parameters. Expected 1. (Access 2007)
- Pass arguments to Constructor in VBA
- How to install Date Picker form control in Excel 2016
- How to install Date Picker form control in Excel 2016
- How to fill color in a cell in VBA?
- Refreshing all the pivot tables in my excel workbook with a macro
- VBA: Run time error ’91’?
- Compare Dates in VBA
- What is the difference between “Form Controls” and “ActiveX Control” in Excel 2010?
- ‘Cannot find DAO350.dll’ file error VB6
- Average in VBA in Excel
- VBA Excel “Compile error: Object Required”
- Choosing paper size (NOT DEFAULT sizes) in excel vba
- “Unable to get the VLookup property of the WorksheetFunction Class” error [duplicate]
- Paste Special error 1004 PasteSpecial method of Range class failed
- VBA: Getting run-time 1004: Method ‘Range’ of object ‘_Worksheet’ failed when using cells
- Cannot run the macro… the macro may not be available in this workbook
- How to resolve “The requested URL was rejected. Please consult with your administrator.”
- ActiveX component can’t create object
- What does the “On Error Resume Next” statement do?
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- How to import files in python using sys.path.append?
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Object Required Error in excel VBA
- What are .NumberFormat Options In Excel VBA?
- Better way to find last used row
- VBA, if a string contains a certain letter
- Excel VBA Macro: User Defined Type Not Defined
- lists and arrays in VBA
- VBA Runtime Error 1004 “Application-defined or Object-defined error” when Selecting Range
- Select method of Range class failed via VBA
- Does VBA contain a comment block syntax?
- Why does “Paste Method of Worksheet class failed” occasionally occur?
- Anaconda / Python: Change Anaconda Prompt User Path
- How can I convert a VBScript to an executable (EXE) file?
- How to return a result from a VBA function
- How to clear memory to prevent “out of memory error” in excel vba?
- Use VBA to Clear Immediate Window?
- VBA: Else without If Error
- Recommended IDE for VBA
- ByRef argument type mismatch in Excel VBA
- Extract a part of the filepath (a directory) in Python
- Run Command Line & Command From VBS
- How to set delay in vbscript
- VBA: Convert Text to Number
- VBA Error: “Compile error: Expected End Sub”
- Scraping data from website using vba
- Error: “Could Not Find Installable ISAM”
- How do I debug a stand-alone VBScript script?
- Loop without Do error
- Resolving File paths – ‘File not found’ error in Eclipse
- Row count where data exists
- VBA array sort function?
- Test or check if sheet exists
- How to detect if user select cancel InputBox VBA Excel
- macro run-time error ‘9’: subscript out of range
- How to Clear Office Clipboard with VBA
- Why does my VBA code throw an “Invalid outside procedure” error?
- What is the difference between \ and \\ in file path
- VBScript to send email without running Outlook
- VBScript to send email without running Outlook
- Desktop: The system cannot find the specified path
- Excel Solver Password: what is it and where can it be acquired/bought?
- Using Excel VBA to run SQL query
- Compile error: Next without For || VBA
- Is there a way to crack the password on an Excel VBA Project?