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.
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
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.