Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tricia
 
Posts: n/a
Default How do you create a page border in Excel?

I have data that spans several pages and would like a page border on the
printed copy. How can I do this without selecting the range of cells on
every page and outlining with border. My data changes and this is a real
pain to re-do every time.
  #2   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Tricia,
Page borders apply to the entire worksheet, doesn't make any difference
what cells are selected, unless you ask to print a selected range, which
would be similar to limiting your print area. Have you tried
File, Page Setup, General, Fit to 1 pages wide, the fit to pages high is
and independent setting which you can leave empty.
-
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Tricia" wrote in message ...
I have data that spans several pages and would like a page border on the
printed copy. How can I do this without selecting the range of cells on
every page and outlining with border. My data changes and this is a real
pain to re-do every time.




  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Tricia,
I guess I missed the point, I was talking about page margins.
The easiest way to change margins is to be in Print Preview mode and then
use the Margins tab, drag the margins to where you want them.

But you are probably asking about getting a heavy border outline at the margins of each
page, or least around the aggregate of all cells on a page, and I don't have
a solution for that.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm




"Tricia" wrote in message ...
I have data that spans several pages and would like a page border on the
printed copy. How can I do this without selecting the range of cells on
every page and outlining with border. My data changes and this is a real
pain to re-do every time.






  #4   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Tricia,
I think this will do what you ask for, but I would not recommend it
Partly because it is based on the used region, which is not properly
maintained in Excel. Also it will destroy other cell borders, and you
will have the bold border around the formerly used region if you
add more rows or columns. I think it would make a mess.

If you still want to go ahead, knowing that you will be forced thereafter
to run the macro again and again, and lose your other borders then
you would install the following macro and invoke it manually.

If not familiar with macros see my page on Getting Started with macros
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Option Explicit
Sub Macro11()
Dim wkSheet As Worksheet
Dim x As Long, cSht As Long, rng As Range
' For Each wkSheet In Application.ActiveWorkbook
'- change to the ones that are grouped
For Each wkSheet In Application.ActiveWorkbook. _
Windows(1).SelectedSheets
'-- Clear all borders
Cells.Borders(xlDiagonalDown).LineStyle = xlNone
Cells.Borders(xlDiagonalUp).LineStyle = xlNone
Cells.Borders(xlEdgeLeft).LineStyle = xlNone
Cells.Borders(xlEdgeTop).LineStyle = xlNone
Cells.Borders(xlEdgeBottom).LineStyle = xlNone
Cells.Borders(xlEdgeRight).LineStyle = xlNone
Cells.Borders(xlInsideVertical).LineStyle = xlNone
Cells.Borders(xlInsideHorizontal).LineStyle = xlNone

'-- thick border around usedrange
Set rng = wkSheet.UsedRange
With rng.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThick
' .ColorIndex = 3 'activate for a RED border
End With
With rng.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 3
End With
With rng.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThick
' .ColorIndex = 3
End With
With rng.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThick
' .ColorIndex = 3
End With
Next wkSheet
If Application.ActiveWorkbook. _
Windows(1).SelectedSheets.Count 1 Then
MsgBox "Please UNGROUP sheets to avoid damaging workbook"
End If
End Sub

--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"David McRitchie" wrote in message ...
Hi Tricia,
I guess I missed the point, I was talking about page margins.
The easiest way to change margins is to be in Print Preview mode and then
use the Margins tab, drag the margins to where you want them.

But you are probably asking about getting a heavy border outline at the margins of each
page, or least around the aggregate of all cells on a page, and I don't have
a solution for that.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm




"Tricia" wrote in message ...
I have data that spans several pages and would like a page border on the
printed copy. How can I do this without selecting the range of cells on
every page and outlining with border. My data changes and this is a real
pain to re-do every time.








  #5   Report Post  
Tricia
 
Posts: n/a
Default

I am asking about getting a heavy border outline at the margins and I can't
find an easier way either. Thank you for responding to my question.

"David McRitchie" wrote:

Hi Tricia,
I guess I missed the point, I was talking about page margins.
The easiest way to change margins is to be in Print Preview mode and then
use the Margins tab, drag the margins to where you want them.

But you are probably asking about getting a heavy border outline at the margins of each
page, or least around the aggregate of all cells on a page, and I don't have
a solution for that.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm




"Tricia" wrote in message ...
I have data that spans several pages and would like a page border on the
printed copy. How can I do this without selecting the range of cells on
every page and outlining with border. My data changes and this is a real
pain to re-do every time.







Reply
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 thickness varies when I paste Excel cells into Word. Sam Excel Discussion (Misc queries) 0 August 31st 05 05:03 PM
page border in excel Trang Excel Discussion (Misc queries) 3 April 16th 05 04:23 AM
changing page break in an excel file ibs81 New Users to Excel 1 April 14th 05 07:03 PM
why would page 1 of an excel worksheet print smaller of page 2 if. hisdrama pest Excel Discussion (Misc queries) 1 January 10th 05 07:14 PM
Hidden page bracks in Excel should be deactivated Tonywww Excel Discussion (Misc queries) 0 December 21st 04 06:21 PM


All times are GMT +1. The time now is 08:06 AM.

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

About Us

"It's about Microsoft Excel"