Browse the file
'Browse the file
Sub BrowseNewFile()
Dim filename
Dim wksh As Excel.Worksheet
Set wksh = ActiveWorkbook.Worksheets("dashboard")
'Opens browse dialog box to browse the template
filename = Application.GetOpenFilename("Excel Files(*.xls), *.*", , "Select any file in the desired folder to catch the path.")
If Not filename = "" Then
wksh.Cells(9, 1).Value = filename
End If
End Sub
Sub BrowseNewFile()
Dim filename
Dim wksh As Excel.Worksheet
Set wksh = ActiveWorkbook.Worksheets("dashboard")
'Opens browse dialog box to browse the template
filename = Application.GetOpenFilename("Excel Files(*.xls), *.*", , "Select any file in the desired folder to catch the path.")
If Not filename = "" Then
wksh.Cells(9, 1).Value = filename
End If
End Sub


0 Comments:
Post a Comment
<< Home