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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only