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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement