Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel file is selected
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01136176
Message ID:
01136201
Views:
14
I'm getting "Unable to set the LineStyle property of the Border class" error.

What is wrong in this code?
** Now apply borders to each header cell
	lcRange = "A" + alltrim(str(m.lnLines + 2)) + ":" + ;
		m.lcEnd + alltrim(str(m.lnLines + 2))

	with loSheet.range(m.lcRange)
		with .borders(xlEdgeLeft)
			.LineStyle = xlContinuous
			.Weight = xlThin
			.ColorIndex = xlAutomatic
		endwith
		with .borders(xlEdgeTop)
			.LineStyle = xlContinuous
			.Weight = xlThin
			.ColorIndex = xlAutomatic
		endwith
		with .borders(xlEdgeBottom)
			.LineStyle = xlContinuous
			.Weight = xlThin
			.ColorIndex = xlAutomatic
		endwith
		with .borders(xlEdgeRight)
			.LineStyle = xlContinuous
			.Weight = xlThin
			.ColorIndex = xlAutomatic
		endwith
		with .borders(xlInsideVertical)
			.LineStyle = xlContinuous
			.Weight = xlThin
			.ColorIndex = xlAutomatic
		endwith
		with .borders(xlInsideHorizontal)
			.LineStyle = xlContinuous
			.Weight = xlThin
			.ColorIndex = xlAutomatic
		endwith
	endwith
>Naomi,
>
>Not only those; there are also Diagonals....
>However, some settings are defaults, and then you may omit to code them
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform