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: 139
Default More Concise Way To Assign Borders?

As a total noob, working from MS Access VBA,
I find myself doing a lot of this:

-------------------------------------------
2010 With theWS
' ----------------------------------------------
' Place Deal/Tranche name centered at top with
' borders and colored background

2020 With .Range(.Cells(mRowNum_Header1, mColNum_First),
..Cells(mRowNum_Header1, mColNum_Last))
2021 .Merge
2022 .Value = theDealName & "-" & theTrancheNumber
2023 .HorizontalAlignment = xlCenter
2029 .Interior.ColorIndex = gExcelColor_MediumBlue

2040 With .Borders(xlLeft)
2041 .Weight = xlMedium
2042 .LineStyle = xlSolid
2049 End With

2040 With .Borders(xlRight)
2041 .Weight = xlMedium
2042 .LineStyle = xlSolid
2049 End With

2040 With .Borders(xlTop)
2041 .Weight = xlMedium
2042 .LineStyle = xlSolid
2049 End With

2040 With .Borders(xlBottom)
2041 .Weight = xlMedium
2042 .LineStyle = xlSolid
2049 End With

2049 End With
2999 End With
------------------------------------------

I tried .BordersAround, but Excel didn't buy it.

Is there something else?
--
PeteCresswell
 
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
borders mhenley5 Excel Discussion (Misc queries) 2 May 5th 09 11:09 PM
Make instructions clear, concise and in plain english. Jo Excel Discussion (Misc queries) 0 May 19th 06 03:31 AM
Concise border removal method XP Excel Programming 1 January 11th 06 08:10 PM
Borders Alan Excel Programming 3 November 10th 04 06:40 PM
Help with borders Ed[_10_] Excel Programming 0 July 23rd 03 08:07 PM


All times are GMT +1. The time now is 10:34 AM.

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"