Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I know that Excel is opened?
Message
From
15/02/2001 09:24:37
 
 
To
15/02/2001 09:06:19
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00475671
Message ID:
00476246
Views:
45
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
Map
View

Click here to load this message in the networking platform