Can't find file

O

Oldjay

I get "Can't find file" when I run this. I am sure I am inserting the correct
file name to recall. The path is correct.

Is there something else I should qualify?

Sub CommandButton6_Click() 'Recall job

Application.ScreenUpdating = False
Application.DisplayAlerts = False

job = InputBox("Please enter JOB file name to recall", "Process
Technogies")
job1 = "c:\Time Seets\" & job & ".XLS"

Workbooks.Open Filename:=job1

Range("D3:D8").Select
End Sub
 
A

Andy Williams

I don't know if you copied this code from your Excel sheet or if you typed it
by hand but one thing that springs to mind is that your directory is probably
called 'c:\Time Sheets\' and not 'c:\Time Seets\' as you've got in the code
below. This might explain why you're getting the error.

I've tried the code myself (substituting my own directories and filenames)
and it works for me.
 
O

Oldjay

Dumb - Thanks
Andy Williams said:
I don't know if you copied this code from your Excel sheet or if you typed it
by hand but one thing that springs to mind is that your directory is probably
called 'c:\Time Sheets\' and not 'c:\Time Seets\' as you've got in the code
below. This might explain why you're getting the error.

I've tried the code myself (substituting my own directories and filenames)
and it works for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top