ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Format (https://www.excelbanter.com/excel-programming/365558-print-format.html)

Eugene[_8_]

Print Format
 
Hi, in my workbook I have 38 sheets (names). Where you can add and delete as
you like. My last sheet "Summary" has got each month horizontally and
different names vertically.
Where each name has a value for every month. Now, these cells (range) all
have borders. When printing this sheet it doesn't print my borders.

The code...

Dim count as Integer = Getsheets() - This gets the last sheet in my workbook
(Summary)

Dim sheet As Excel._Worksheet = CType(book.Sheets.Item(Count),
Excel._Worksheet)

With sheet
.PageSetup.Orientation = Excel.XlPageOrientation.xlLandscape
.PageSetup.TopMargin = 0
.PageSetup.BottomMargin = 0
.PageSetup.LeftMargin = 0
.PageSetup.RightMargin = 0
.PageSetup.Draft = True
.PageSetup.PrintGridlines = True
.PrintOut()
End With




All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com