vb6 Open File For Output doesn't work in Vista

In Visual Basic 6.0, I have written a subroutine that creates a new text file using the command "open [file name] for output  as [#FileNumber]", then writes data to the file using the "Print" command.

This works in all versions of windows except Vista, where it simply does not create the text file, without any error messages.

Thanks for your help!
ttobin333Asked:
Who is Participating?
 
twardConnect With a Mentor Commented:
What is the path of the file?
The program may not have write privileges where you are trying to write to.

Are you sure  you are not getting an error and just supressing it in VB?
0
 
hesCommented:
Also what flavor is Vista ?
0
 
ttobin333Author Commented:
For file path, I tried application path and c:\. Which path would be safest to use?

Vista flavor is Home Premium.
0
 
ttobin333Author Commented:
I experimented with file locations and in the end created a new folder off of C:\, where I targeted the output file. It worked. I should have guessed that Vista didn't like me tampering with the program files folder and root directory...but XP didn't mind at all!

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.