I have a problem that I hope someone here might help me with. I've been trying to make a program that is suppose to display a dialog box to load a sequencial .dat file but whenever I try to load click on the file through the dialog box I get a "Code 52 error" that indicates something is wrong with the file's name. I'm at a loss on what to do because I need the program to access different named files through the dialog box, not just one set perameter name. Here is the following code I'm using...
Private Sub mnuLoadLeague_Click()
CommonDialog1.Filter = "Data Files(*.dat)"
CommonDialog1.ShowOpen
LeagueName = CommonDialog1.FileName
Open App.Path + "..\League Data\" + LeagueName + ".dat" For Input As #1
Input #1, LeagueName, LeagueStructureSelection, PostseasonTournamentBowlGameSelection
Close #1
End Sub
The problem seems to be occuring in line 3. It doesn't seem to want to pass on the files name to "LeagueName" to allow the dialog box to access different named files. Am I doing something wrong here?