Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
That doesn't happen on MY machine
Message
 
To
21/12/2006 15:27:19
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01179645
Message ID:
01179680
Views:
9
I just realize that I have a BUG in my suggestion (After I read Alan's answer) :-)
Change this:
....
lcPath  = SET([PATH])
SET PATH TO
IF FILE(m.newfile)
   lnHndlr = FOPEN(m.newfile, 12)
   lnFor   = 1
   DO WHILE lnHndlr < 0
      m.newfile = m.dir + [data\labels]+ALLTRIM(STR(lnFor)) + [.xls]
      IF FILE(m.newfile)
         lnHndlr = FOPEN(m.newfile, 12)
      ELSE
         lnHndlr = FCREATE(m.newfile)
         EXIT
      ENDIF
      lnFor     = lnFor + 1
   ENDDO
ELSE
   lnHndlr = FCREATE(m.newfile)
ENDIF
SET PATH TO (lcPath)
FCLOSE(lnHndlr) && Don't care abou of the action of open or creating the file is successful
IF lnHndlr < 0
   MessageBox([You don't have permissions to create a file)
ELSE
   *** Excel SaveAS method
ENDIF
*** cleaning code
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform