|
-
May 2nd, 2002, 07:33 AM
#1
Thread Starter
New Member
Format borders in Excel sheet
I am trying to get VB to format borders in an Excel sheet.
Why isn't the following code working?
Dim xlEdgeBottom
Dim xlDouble
Dim xlThick
xlEdgeBottom = 1
xlDouble = 1
xlThick = 1
Set Range1 = Sheet5.Range("A1", "C1")
With Range1.Borders(xlEdgeBottom)
.Linestyle = xlDouble
.Weight = xlThick
End With
Does anyone have any tips on links or other codes (border style, etc)
THX
Humty
-
May 2nd, 2002, 07:53 AM
#2
Problem 1 - you shouldnt be defining the constants, and you've got them wrong anyway; they should be:
xlEdgeBottom = 9
xlDouble = -4119
xlThick = 4
Problem 2 - what is this in? VB, Excel VBA?
Problem 3 - does the sheet exist?
-
May 2nd, 2002, 08:23 AM
#3
Thread Starter
New Member
Problem 1 - you shouldnt be defining the constants, and you've got them wrong anyway; they should be:
xlEdgeBottom = 9
xlDouble = -4119
xlThick = 4
Problem 2 - what is this in? VB, Excel VBA?
> VB
Problem 3 - does the sheet exist? [/QUOTE]
>Yes
Hope u can help me.
-e-
-
May 2nd, 2002, 08:26 AM
#4
ok, I need to see more of your code that comes before this bit (especially the bit ti to get the sheet reference).
-
Jan 23rd, 2003, 12:26 PM
#5
New Member
I too need various xl constants defined. (ie. xlNone, xlEdgeBottom, xlThin, xlAutomatic, xlCenter, etc.)
What do I need to do to get these added to my dll?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|