Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime error '75' Path/File Access Error

Status
Not open for further replies.

NewToVB

Computer
May 4, 2007
5
0
0
CA
Hi there,

Does anybody know why I keep getting this error? I try to create a text file from this vb program and it keeps giving me this error Runtime error '75' Path/File Access error. The path/File is pointed to my C: drive and I have full access to it.

Thanks,
 
Replies continue below

Recommended for you

Const ELECTIONDRIVE As String = "\\LKADFC6\Drivers" ' Drive letter mapping
Const ELECTION2007DIR As String = "\Election2007\" ' Local directory for exported documents
Const DATADIR As String = "ElectionData\" ' Election directory for data
Const PHONEINDIR As String = "PhoneIn\" ' Phone In data files directory
Const COMPLETEDIR As String = "Complete\"

Hi HandleMan,

Above is the path and below is where it got stuck trying to open to write to it.

Private Sub Create_RaceResultsFile()

Open RaceResultsStr For Output Access Write Lock Write As #RaceResultsNumberFile

Thanks,
 
Add a couple of Debug.Print statements and show us the results
Code:
Private Sub Create_RaceResultsFile()
[red]Debug.Print "Filename = " & RaceResultsStr
Debug.Print "Filenumber = " & RaceResultsNumberFile[/red]
Open RaceResultsStr For Output Access Write Lock Write As #RaceResultsNumberFile


Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting
Steam Engine enthusiasts
Steam Engine Prints
 
Does the specified directory exist? I don't believe it will be created automatically just by specifying the path. If any portion of the path does not exist yet you will have to explicitly create it.
 
Status
Not open for further replies.
Back
Top