Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel cell backround color....
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00887668
Message ID:
00887681
Views:
5
Hi Adam,

In general:
ox = CREATEOBJECT("excel.application")
ox.VISIBLE = .T.
ox.Workbooks.ADD
ox.ActiveCell.SELECT
WITH ox.SELECTION.Interior
	.ColorIndex = 34 && Cyan
	* Some optional settings
	*        .Pattern = xlSolid
	*       .PatternColorIndex = xlAutomatic
ENDWITH
You can get the Excel constants values from file#9498 in Downloads section
Your best friend may be not the reference site, but simply Excel Macro recorder :). Do what you want in Excel, recording the macro, then edit it and translate the code into VFP.

>Hey,
>
>How do I change the backround color of a cell using OLE?
>
>Does anyone have a good reference site for OLE and Excel besides MSDN?
>
>Thanks!
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform