Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21842

Path not found error?

$
0
0
Hi there everyone! I am working on a simple review game for review math questions with students. I am storing all of the questions and answers in text files. I have it set up so there are different categories, and each category folder in the prog has the same files, just the category number is different, so there are 11 categories, the folders are Category1, Category2, etc..

Anyway to help simplfy things, I have the program check to see which category is being edited, so it looks for a number in a label caption to know which category folder to save in.

Like this..

'Open App.Path & "\Category" & CatLBL.Caption & "\Cat" & CatLBL.Caption & "A1.txt" For Output As #iFileNo

So if it didn't check the label caption, the actual path I want it to save it, and the below path DOES work is...

Open App.Path & "\Category1\Cat1A1.txt" For Output As #iFileNo

The problem is I get a file path not found error when I use the line

Open App.Path & "\Category" & CatLBL.Caption & "\Cat" & CatLBL.Caption & "A1.txt" For Output As #iFileNo

Did I mess up the formatting when I changed it to include the label caption for the category number? Thanks

CatLBL.Caption has the category number.
:)

Viewing all articles
Browse latest Browse all 21842

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>