Thanks for this code; it is very cool.
I did cut and paste into my program and I'm getting the not declared error
on xlContinuous and xlMedium.
Is it possiblt that I'm missing something else?? Like I said I have "xl"
assignments in other places in my program without any problems.
Thanks
Steve
"JLGWhiz" wrote in message
...
By the way, You could use the BorderAround method and reduce the amount of
code you are writing.
With osheet.Range(MultiLetter & "1").BorderAround
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Does all four sides at once.
"Stephen Plotnick" wrote:
I want to have a border around some cells. I 'm using VB 2005 and Excel
2007. I went into VBA within Excel to trap a macro to assist me.
Here is the code I transferred to VB 2005:
With osheet.Range(MultiLetter & "1").Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With osheet.Range(MultiLetter & "1").Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With osheet.Range(MultiLetter &
"1").Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With osheet.Range(MultiLetter & "1").Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
All the "xl" commands are getting not declared errors. For a note I'm
using
"xl" commands all over the place without any issues in the program except
here, and these types. For example I'm using xliconsets, xl3arrows, etc
without any problems.
Thanks in advance
Steve