Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Choose cancel
Message
De
15/08/2004 06:52:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00930924
Message ID:
00933408
Vues:
21
hi,

i useto your code to make a cancel, if i don't want compleate the operation

as my code ,but i get error message at append command(No table is open in the current work area ) in mycode,and when i make cancel,
at the begining he go to dirfile,i want to make cance return me back at my form ex.. thisform.text1.value or just at my form.

this is the code.
SET TALK OFF
SET ECHO off
SET CENTURY ON

thisform.text2.Value="NEWDNC"
THISFORM.Olecontrol3.Visible=.T.
GETDIR()
local lcfile
lcfile=getfile()
if empty(lcfile)
   thisform.text2.setfocus()
   thisform.text2.Value=SPACE(10)
   else
 thisform.text1.Value = lcfile


SET DEFAULT TO e:\samerqda
LOCAL lcTableName
lcTableName = thisform.text2.value  

CREATE TABLE &lcTableName (char1 c(10), char2 c(70),char3 c(10), char4 c(10),char5 c(10), char6 c(40),fld10 c(40))
NOCPTRANS)
APPEND FROM (thisform.text1.value)TYPE XLS
GO TOP
DELETE NEXT 1 
SET DELETED on
REPORT FORM nes preview
*REPORT FORM NES TO PRINTER PROMPT PREVIEW IN WINDOW myPreviewForm
*REPORT FORM nes TO PRINTER PROMPT PREVIEW
m.a=thisform.text2.Value
CLOSE all
USE (m.a)
gcDelimName = ALIAS( ) + '.xls'
gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
IF EMPTY(gcDelimFile)  && Esc pressed
   CANCEL
ENDIF
COPY TO (gcDelimFile) xls for recno()>2 && or 1
MODIFY FILE (gcDelimFile) NOEDIT
ENDIF
thanks.

regards.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform