Open Dialog in Excel via VBA

This allows users to open files from VBA in Excel.

Sub Get_Data FileToOpen = Application.GetOpenFilename _ (Title:="Please choose a file to import", _ FileFilter:="Excel Files *.xls (*.xls),") '' If FileToOpen = False Then MsgBox "No file specified.", vbExclamation, "Duh!!!" Exit Sub Else Workbooks.Open Filename:=FileToOpen End If End Sub

Code Snippits