Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE to Excel
Message
From
01/10/1998 02:07:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/09/1998 17:35:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00142588
Message ID:
00142691
Views:
30
>I am using VFP 5 to control Excel. I have been
>attempting to use the Macro recorder to provide
>some help, but now I am stuck.
>
>All I want to do is select a portion of a row
>(say B3:B10) and add a continious line to the top
>edge of this selected area.
>
>The code from Excel returned the following:
>
> Range("B3:B10").Select
> With Selection.Borders(xlEdgeTop)
> .LineStyle = xlContinuous && value of a 1
> .Width = xlThin && value of a 2
> .ColorIndex = xlAutomatic && value of -4105
> EndWith
>
>What is the value of xlEdgeTop? Not sure this syntax
>will port to VFP. anyone know how to draw a solid
>line through a selected area in Excel using VFP?

Syntax ports to VFP nearly same :
#define xlEdgeBottom  9
#define xlEdgeLeft  7
#define xlEdgeRight  10
#define xlEdgeTop  8

#define xlContinuous 1
#define xlThin 2
#define xlAutomatic -4105
cMyxlsfile="\my documents\fiat.xls"
oexcel = createobject("Excel.application")
with oExcel
	.visible = .t.
	.workbooks.open(cMyxlsfile)
	.activeworkbook.worksheets(1).Range("B2:M2").Select
	with .Selection.Borders(xlEdgeTop)
		.LineStyle = xlContinuous
		.Weight = xlThin 
		.ColorIndex = xlAutomatic 
	EndWith
endwith
All office constants are in wc0993.exe at MS site (don't know exact place).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform