After I had created a file called Contacts.xls with the command COPY TO, as follows:
IF VAL(OS(3)) >= 5 && WINDOWS 2000 = "5", WINDOWS XP = "5.01"
COPY TO "C:\Documents and Settings\Contacts" TYPE XL5
WAIT WINDOW NOWAIT ;
"New Excel File Contacts in C:\Documents and Settings - " + ;
"Count = " + ;
ALLTRIM(STR(lnRecords))
ELSE && Windows 95/98 < 5
COPY TO "c:\My Documents\contacts" TYPE XL5
WAIT WINDOW NOWAIT ;
"New Excel File Contacts in C:\My Documents - Count = " + ;
ALLTRIM(STR(lnRecords))
ENDIF
Here's the message I get when I open the contacts.xls file after its creation above:
"A document with the name 'contacts.xls' is already open. You cannot open two documents with the same name,..."
When I open the Excel file, it opens just fine, however, I get a message telling me that the EXCEL file is already open and that I need to close one of them. FoxPro HELP is a little vague about what happens after it creates the EXCEL file; it doesn't trell you that it leaves the file open, or whether or not it clsoes it, but that is the only explanation I can come up with when I get this error message.
So, does anyone understand why I get this error message?