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

Need help with FileName

$
0
0
In an application I need to open a textfile,"James.txt"

The following code works :

Open "James.txt" for input as #1
Input #1,abc

My next step is to use FileName instead of "James.txt"


Open FileName for input as #1 etc

FileName = "James.txt" works ok
FileName = James fails

Is there a code which would add .txt to the FileName thus allowing to open the file with FileName ?

I appreciate your help

RobertXYZ

Viewing all articles
Browse latest Browse all 21847

Trending Articles



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