Free Microsoft Excel 2013 Quick Reference

Excel Print Preview with Borders and Shading


I noticed that in my worksheet, I have a cell all filled with 'Borders and Shading'.
However, when I go to Print Preview, some lines of the Borders have gone. Please see
attached Word Document which depicts this.

It prints out ok but does anybody know why this may happen?

Kind regards,


Post your answer or comment

comments powered by Disqus
It is possible to create quickly an excell table with borders and shadings
(with rows darkened and lightened alternatively) like it can be done with
Word Tables?


In excel when I have a data with borders and want to print it is there
anyway for the last line of data on each page to apply a border underneath?


I am coding a sheet in which I need to insert multiple rows and I have a
function that I can call that does this splendidly. The problem arises if you
have a row with shading and borders ABOVE the row on which you are doing an
insert, then the borders and shading from the row above is copied down when
the insert is done.

I just want to do a row insert without the cell shading and borders being
copied down using VBA code. Can someone give me an easier way than having to
reformat everything every time?

My current function I'm using is below (remove row wrapping):

Public Function RowsInsert(argStartCell As String, argRowsToInsert As Long)
0).Address)).EntireRow.Insert Shift:=xlDown
End Function

I have a spreadsheet with very distinct borders and shading. I want the ability to drag a cell over another cell to copy but want to maintain the original borders/shading. Any suggestions?

I need to convert an Excel file to html with the ability to sort and filter the table produced. I would need this table to be viewable in Firefox and IE when loaded on a webpage.

Is there any software out there to do this or a method to add these features? An optimal solution would be one that allows me to modify/update the tables and apply to other tables without too much braindamage, i.e. export excel to html with autosort and autofilter of top row already there or add autosort and autofilter to html table.

Thanks in advance for any help!

- David

How can I freeze border and shading layouts without freezing the cell itself
completely. When pulling down/copy cell formulas etc it also copies the
layout (border and shading) in most cases its fine but quite irritating if
you have different shadings and or borders and have to fix it all over agian.


Just started using Excel 2007 and in many documents I create I need to paste screen capture graphics into the excel file. I use the !Quick Screen Capture software.

I noticed that when I am in print preview with margins showing, if I adjust the column widths in order to adjust areas with text the graphics I have pasted change size - they get really small. I have to exit print preview, right click on the graphic, select format picture and then click the reset picture button to get the graphic back to original size. This resizing does not happen if I adjust the column widths in normal view mode.

This never happened in Excel 2003 so I'm confused on how to fix it. Is this just normal and I'll have to adjust to it or is there a setting that will prevent the graphics from autosizing if I adjust columns while in print preview mode?

Many thanks for your help.


I have a form that I am trying to prevent users, using Excel 2010, from printing or using the print preview with multiple pages selected, which is causing the controls on the selected sheets to move. The code below works for printing, but not for the print preview. I don't see another event that would handle this in 2010. Is there a way to do this?

Private Sub Workbook_BeforePrint(cancel As Boolean)

    If ActiveWindow.SelectedSheets.Count > 1 And Application.Version > "11.0" Then
        cancel = True
        MsgBox "Do not print or preview with multiple pages selected", vbCritical
    End If
End Sub

Using Excel 2003 I am printing multiple sheets. I have a footer on every sheet that is in the format of: page # of total pages.

When I do a print preview page number and total number of pages looks correct on every page.

However when I actually print the file the total number of pages varies and some of the sheets have wildly incorrect total number of pages (i.e. 26 total pages instead of 16 and other variations).

In doing some searches in the message boards and yes my default print driver is the same as the the one I am actually using.

I have checked various page setup options all looks "safe".

The only thing I can think of is I am using PDF Creator as my print driver. Due to various reasons I have not had a chance to test with other print drivers except for doing Print Preview but not actually doing Print.

I would have thought that as PDF Creator from PDFforge should work fine on this file as I do this all the time on other Excel files with the product. All it is doing is just capturing the print format output.

Any thoughts or ideas of something to check.

I will be doing more testing and report what I find, but would love to keep useing PDF Creator.



I am trying to update a suite of EXCEL 2003 VBA-controlled files for use with EXCEL 2007. I have found 2 problems, this one and the one entitled 'Pivot Table displays - Extra characters in 2007' which I have posted this morning.

I use a Print Preview command to display a Pivot Table sort so that the user can check the setup before printing. The following code is called from the routine for the worksheet containing the Pivot Table, so that the arguments are defined in the call.

Sub Print2(sheet, title, area1, S1)
With ActiveSheet.PageSetup
.LeftHeader = title
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "&8&D"
.CenterFooter = ""
.RightFooter = MyTitle
.PrintHeadings = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
ActiveSheet.PageSetup.PrintArea = area1
ActiveSheet.PrintOut preview:=True, ActivePrinter:=True, collate:=True
ActiveWindow.ScrollColumn = S1
ActiveSheet.DisplayAutomaticPageBreaks = False
Exit Sub
End Sub

This code works without any difficulty in EXCEL 2003, but leads to freezing of the program when it is run under EXCEL 2007. The correct preview window is displayed but the Esc button has to be used to return control to the VBE.

However, if the routine is paused just before the '******' highlighing and then the command

ActiveSheet.PrintOut preview:=True, ActivePrinter:=True, collate:=True

is executed in the intermediate window, there are no problems. The Print Preview menu appears and can be closed after inspection using the command on this toolbar.

Has anyone found a solution to this problem, which seems to have been identified in other recent posts?

When you go to print preview in Excel the next page button appears to the
left of previous. It seems like it should be the other way. [Previous] [Next]
instead of [Next] [Previous].

I have a document i am trying to print out, when viewed in excel i dont see it, only in print preview (and obviously when i print) it has the document title on the top left, and the document author i think it is, idk but i need to either change that name, or get rid of that header in general, how do i do this?

We prepared a spreadsheet and we decided to use diagonal borders on the
angled titles. Although we can see them on Print Preview, the borders won't
print. Please help!

I have a worksheet with a defined print area (say columns A:Q, for
instance). Outside of this area, in columns R:S, I have a checkbox.

For whatever reason, when I got to print preview the worksheet and then
return to the normal view (working environment), I find the checkbox
jumps, apparently randomly and for no reason, all the way over to
columns C.

Does anyone know why this might be happening or if there is a bug that
documents this (and, of course, whether or not there is a workaround?)



Peter Bernadyne
Peter Bernadyne's Profile:
View this thread:

Hi Everyone,

Someone sent me an excel sheet and they selected the whole sheet and put
borders on all cells. They also shaded columns all the way down. I have 72
pages but only want one. I need to keep the borders and shading on cells
A1-AG40. I tried to delete the rows by selecting for 41 and dragging down
but I got to 50,000 rows and there were still more. How can I clear the
contents of everything below row 41 and keeping everything above intact?



I have cross posted this message as I don't have a clue where the problem

One of my users has a Sony TX mini laptop (only a few weeks old). On there,
he has Office 2000, Norton Security Centre, and an O2 3G card. Under certain
conditions, Excel refuses to open. The conditions are as follows.

1. O2 3G card and program running, NAV running, cannot open Excel.
2. O2 3G card and program running, NAV disabled, can open Excel.
3. O2 3G card and program not running, NAV running, can open Excel.

This problem only started today. The user has shutdown fully and re-started,
to no avail. I know there are issues between NAV and Office add-ins, but not
sure if this is anything to do with it. Does anyone have any ideas?


To any Programmer,


I used to be able to call Print Preview in code, and immediately upon
display of the preview window I could use the scroll-wheel on the mouse
to start advancing thru the 'preview' ...

Somewhere along the line (not sure if it was the change to Office2000,
I have to now select ANY button (once) on the Preview tab to 'allow'
the scroll-wheel to function as it used to - (Not sure why 'focus' is
not given to the Preview window).

Once I select, for example "NEXT", then the scroll-wheel works.

Any ideas on how to give focus to PREVIEW? ... I'm currently using code
similar to the following:

Function PageToPrintOrView(iStart As Integer, iFinish As Integer, _
iPrintOrView As Integer)
' Routine receives:
' iStart Value: Start Page #
' iFinish Value: Finish Page #
' iPrintOrView Value: 0 = Print / 1 = PrintPreview
With ActiveSheet
.PrintOut From:=iStart, To:=iFinish, Preview:=iPrintOrView, _
Copies:=1, Collate:=True
End With
End Function



I have a worksheet with a defined print area (say columns A:Q, for instance). Outside of this area, in columns R:S, I have a checkbox.

For whatever reason, when I got to print preview the worksheet and then return to the normal view (working environment), I find the checkbox jumps, apparently randomly and for no reason, all the way over to columns C:D.

Does anyone know why this might be happening or if there is a bug that documents this (and, of course, whether or not there is a workaround?)



I have an Excel Worksheet that is formatted with borders and shading. When I
type into a cell, or paste into a cell, the formatting disappears, and seems
to revert to some default value. Can anyone help explain how to make Excel
act like iot's supposed to?

I recorded a macro that turned on print preview. I would like to turn it off
with a macro. can I do this?

Hi guys, I have two issues, one minor and the other maybe a little more complicated.

I have a macro written that formats an imported spreadsheet. The data will not always the same length, but I need to add a border to it regardless of how many rows there are. Is there a way that I can add to the macro some code that will surround the data with the appropraite border and stop when the data ends?
The data ranges from column B to D and doesn't start until the 9th row. I need a heavy border surrounding it and thin borders within.

Secondly I have a fourth column of data. This contains either nothing, or the words NETT 1234, always NETT, but the number will change. I need to add into my macro some code to take the data in column E and if it contains the word NETT to replace the data in D with the numerical value that follows NETT.

I have searched the forum for answers but have come up at a loss.

I know it may be asking a little too much but any help would be really appreciated.


Peace to you all
I already have a code to printpreview multiple ranges

    Sh = "Sheet1" 
    A = Sheets(Sh).Range("J6") 
    B = Sheets(Sh).Range("K6") 
    C = Sheets(Sh).Range("M6") 
    D = Sheets(Sh).Range("N6") 
     ' to always put the first row in the printpreview
    Sheets(Sh).PageSetup.PrintTitleRows = Sheets(Sh).Rows(A).Address 
     ' to always put the first column in the printpreview
    Sheets(Sh).PageSetup.PrintTitleColumns = Sheets(Sh).Columns(B).Address 
     ' to put multiple columns in the printpreview
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
It printpreviews only the first Range ( C )
I need it to print previews Ranges ( C ) and ( D ) or more in one page
I hope I'm clear enough
Any help'd be highly appreciated

I don't have 2007 installed anywhere, but we're having problems with
workbooks that I modified in Excel 2003 to include a lot of macros. Now
(5-6 months after release), I'm being told by some users that the workbooks
have no macros. One was sent to me and all of the worksheet code names had
been removed as well. Can someone tell me what happens if an Excel 2003
workbook with macros and modified worksheet codenames is saved as an Excel
2007 .xlsx file and then reopened in Excel 2003 (if it's possible). I'm
wondering if that's what's been happening with these files. I don't believe
that 2007 has been deployed enterprise wide, but I'm beginning to wonder if
some have it already.

Barb Reinhardt

On one of my files, when I try to do a print preview, I get this message:

"No more new fonts may be applied in this workbook"

The print preview still occurs and I am able to do a print to printer without error.

Why am I getting the error and how can I make it stop?

Thanks for your help.

No luck finding an answer? You could always try Google.