LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Trying to format a cell with a border

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
border on last cell of page effects border on beginning cell of ne GaryE Excel Discussion (Misc queries) 0 March 23rd 09 05:47 AM
Format Cell- Border Line Benz Excel Programming 3 September 5th 06 07:39 PM
How do I change the format/cell/border/automatic color to black tanya Excel Discussion (Misc queries) 1 March 6th 06 08:00 PM
Changing the border of one cell s/n change the border of adjacent gjanssenmn Excel Discussion (Misc queries) 2 October 5th 05 08:35 PM
format border by group jackie Excel Programming 6 May 27th 04 09:43 PM


All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"