Home Excel VB/VBA Open Excel File From Macro
20 | 05 | 2012
This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade

Open Excel File From Macro PDF Print E-mail
User Rating: / 0
PoorBest 
Tutorials

Code below displays a file dialog box. Select a file and open upon enter.  

[code]
Sub OpenExcelFileDialog()
 
    '****************************************
    '*** Code from VisibleVisual.com ********
    '****************************************
 
    Dim XLFile As Variant
 
    'Open Excel Dialog Form
    XLFile = Application.GetOpenFilename("Excel Files (*.xl*)," & _
    "*.xl*", 1, "Select Excel File", "Open", False)
 
    'Exit on Cance;
    If TypeName(vFile) = "Boolean" Then
        Exit Sub
    End If
 
    'Open the File
    Workbooks.Open vFile
 
End Sub
[/code]
 
 

 

Add comment


Security code
Refresh

This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade