Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logic Problem

Status
Not open for further replies.

kaylabear

Programmer
Oct 23, 2002
59
CA
Hi everyone,

I'm having a real problem trying to recompile my source code on an earlier version of windows. Initially I designed my program on windows XP, but I am now trying to recompile it on windows 98.

The following error message occurs on this line:

Open "display.html" For Output As #1

--> Identifier under cursor is not recognized.

Now I'm really stumped as to why I get this error message when I'm compiling on a windows 98 machine and not a windows XP machine, as both computers have the exact same Visual Basic 6 program on them.

If anyone can offer some insight, I would really appreciate it, THANKS.
 

check your curdir in the debug window (?curdir) and see what it is pointed to. If it is a system folder then that may be your problem. You will then need to add a path to your open statement, maybe App.Path or whatever.

Good Luck

 
Just another thought. It's bad practice to say Open "filename" for Output as #1

You should get a freefile number. THat way if the filenumber is in use you won't have overlaps.

Try this instead.
[tt]
Dim FileNum as Integer
FileNum = FreeFile

Open "filename" for Output as #FileNum
[/tt]

Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top