Finding a File on the C Drive
If you want to open the file through the Open Dialog Box:
Sub ShowOpenDialogBox()
Const YourFile = "C:\My Data\Accounts.xls"
Application.Dialogs(xlDialogOpen).Show YourFile
End Sub
OR
If you want to open the file through the macro:
Sub OpenYourWorkBook()
Const ItsDir = "C:\"
Const ItsPath = "C:\My Data"
Const ItsName = "Accounts.xls"
ChDrive ItsDir
ChDir ItsPath
On Error Resume Next
Workbooks.Open ItsName
End Sub
Swisse
|