Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I know that Excel is opened?
Message
De
15/02/2001 09:24:37
 
 
À
15/02/2001 09:06:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00475671
Message ID:
00476246
Vues:
40
Hi, Daniel

thanks for you help, the code as below :-


EXCEL_FILE = CREATEOBJECT("EXCEL.SHEET")
*EXCEL_FILE.APPLICATION.VISIBLE = .T. && don't display on screen
MERROR = .F.
ON ERROR MERROR=.T.
EXCEL_FILE.APPLICATION.WORKBOOKS.OPEN( THISFORM.MFILE )
ON ERROR DO errhand WITH ;
ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )

DO WHILE .T.

IF MERROR
=MESSAGEBOX("File is not existing or opened, can't open it.","** MESSAGE **")
EXIT
ENDIF

* EXCEL_FILE.APPLICATION.CELLS(1,2).FONT.COLORINDEX = 3
FOR HHH = 1 TO 37
EXCEL_FILE.APPLICATION.CELLS(HHH,2).INTERIOR.COLORINDEX = HHH
NEXT

EXIT
ENDDO

******

PROGRAMM ERROR IN .FONT.COLORINDEX AND .INTERIOR.COLORINDEX

The first time i run this program the color in sheet had change.
Then i run the program again....the Error message will come out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform