VBA Conditional Page No Printing

Aug 13, 2008

I need a code that will print a page only if there is a value in cell G4 for example.
Im think I have part of the code but cant work out the " if " part
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True

View 9 Replies


ADVERTISEMENT

Printing One Page Grayscale And One Page Color With Code

May 21, 2009

I have a report that I use and right now I have a command button that prints the report x2. What I would like to do is to have it print one in color and one in grayscale. I could do this I think with two different buttons, but I would like to utilize just one. I tried creating a macro but it did not pick up the fact that I changed the properties to black and white.

View 2 Replies View Related

Fit One Page When Printing

May 8, 2008

I need to create a macro code to adjust the width of the columns so it fit in one page for printing. So If it only has 3 columns, the widht will be wider but if it has 200 columns then the width will be much smaller.

View 2 Replies View Related

Printing Blank Page

May 31, 2013

I have a set of pages I'd like to print on both sides of the paper, in excel the pages are laid out side by side.
I'd like to print them so that the double page spread is on two bits of paper, as in a book, then, you can turn the page and see the next double page.

At the moment, when I print, I get page one, then turn and see pages 2 & 3.

How do I print a "page 0", then turn over to see pages 1 & 2?

View 1 Replies View Related

Printing Some Rows In Every Page

Nov 1, 2009

I am making a project in which there is vast data of around 10-15 pages to get print...but due to vast data its not possible to get all printed in 1 pages...So i want that cell A1:K4 & A47:K53 to get print in every sheet...Header and footer is not posisble due to some logo at the end of the page..is there anyway for such printing option...

View 9 Replies View Related

How To Add A Line To The Bottom Of Page For Printing

Apr 8, 2014

When printing, how to automatically add a line at the bottom of each page? I don't want to make the line physically there. Just show the line in the page when printed.

View 2 Replies View Related

Printing Filling The Entire Page

Aug 13, 2007

I'm trying to scale a worksheet so that when it prints it fills the entire A4 page.

I have used under the print preview menu - page setup option the fit to 1 page with by 1 page tall option. This creates a blank space at the bottom of printed area.

Is there any way I can get Excel to stretch the vertically side of things so that it fills the entire page?

View 9 Replies View Related

Printing Columns Headers In Every Page

May 26, 2009

Is there a way to print my columns headers in every page?

Everytime I have to print my spread sheet, I always have to keep page#1 in hands, because I cannot remember the headings.

View 2 Replies View Related

Printing Multiple Pages On One Page

Feb 3, 2010

I have a list that I need to print. It is only 2 columns, but 12 pages long. I would like to print 4 or 6 pages, side by side on the same sheet. I tried changing the print setting to 4 pages per page. But, when I looked at the print preview, it showed only 1 page per page.

View 11 Replies View Related

Printing Cuts Off Half Page?

Jul 5, 2014

When I go to print my 1 page document, I've selected to have the page shrink to fit onto 1 page. For some reason, when I choose this option to shrink, it doesn't print the entire document, only about 3/4 of the page or so. Something I did recently that was a little different that may have caused this but am honestly not sure is i added my company logo to the header so it'd print on the document too. If I added it as an image, for some reason it wouldn't print.

View 7 Replies View Related

Printing Only Active/current Page

Jan 3, 2007

I have a workbook with 8 sheets. Two of the sheets have 31 pages (one page for each day of the month). I have to input data every day into these sheets on the current day (ie: If the first day of the current month is Sunday, that is page 1). I have to print out the current days page (not the sheet) after it is complete. Is there a macro or vb code that will print out the current day/active PAGE only? As it stands, I have to do the ctrl+p thing to get the print dialog box, and input the page I want printed....as you know, I have to input the page twice in the dialog box to print only one page, otherwise it starts to print from the page I chose.....and if I don't pay attention, I can print 30 pages when I only wanted one.

View 9 Replies View Related

Printing Columns And Rows In Every Page

Jan 26, 2009

in my file i have rows/columns a1:z50. now my requirement is that rows as header a1:a3, as footer a47:a50 and columns a:c to be printed in every page.

View 9 Replies View Related

Macro - Page Breaks/printing

Mar 20, 2009

is there a macro code that will autmatically determine the end of your page and adjust your page breaks accordingly?

View 9 Replies View Related

Printing Each Spreadsheet Row On A Separate Page

Mar 29, 2007

I am trying to take a spreadsheet and have each row print on a seperate page - without having to do the print area thing on each row. Is there a way to automate this process?

View 2 Replies View Related

Display One Instance Of Each Team Name As The Page Header Upon Printing?

Jun 12, 2013

I'm working on a simple spreadsheet with individuals divided among teams. Each team is separated by a page break, so the column displaying Team Name repeats the same team name all down a page, and then another team name all down the next page, and so on. I've been searching for a way to display one instance of each Team Name as the Page Header (or just at the top of each page) upon printing. I've included an attachment for reference.

View 3 Replies View Related

VB Code/Macro Printing With Page End Pulled From Workbook

Oct 29, 2008

I have a worksheet that changes in length. There is a formula that calculates how many pages the sheet will be. The also is a print button on the sheet that will print a coversheet "Sheets("Title")" and then it is supposed to print the data on the second sheet. Below the code I have so far... I know I am missing something, but knowing very little about macros I just can't seem to figure it out.

View 2 Replies View Related

Excel 2010 :: Printing Multi-page Document?

Nov 23, 2011

Have very recently been upgraded to Windows 7 with Excel 2010 at work. On printing out a 10 page doucment, (all of which are landscape format), when vewing print preview, the first page is previewed as landsacpe, but subsequent pages are portrait.

If you change format of 2nd page to landscape all subsequent pages switch to landscape.

Have looked at a similar format document created last month and it behaves exactly the same. Whole document landscape but on print preview only first page is...

View 3 Replies View Related

Page Number Sheets When Printing Entire Workbook

Aug 21, 2007

I am trying to find a way to print an "entire workbook", but have each of the sheets paged as a group separate from the rest. One workbook typically has up to 20 sheets, with each sheet up to roughly 8 pages. I need each sheet set to show page 1 of 8 or page 5 of 8, not page 22 of 53. Counting and typing in the total number of pages in each sheet's footer is too cumbersome. Also, printing each sheet individually has also been cumbersome when printing to PDF. Are there any other ways to have the "&[Pages]" function only reflect the number of pages within the sheet instead of in the entire workbook?

View 9 Replies View Related

Active Worksheet Switches To Page Break Preview After Printing?

Aug 7, 2013

I have a workbook with multiple sheets where the view for each sheet is the Normal view.

If I print the entire workbook, the active sheet changes to the Page Break Preview view after the printing finishes.

I have to then reset the view back to Normal.

I don't know why the active worksheet is changing. I don't want to annoy the people who will use this workbook by making them change back to normal view after each time they print.

View 3 Replies View Related

EXCEL 2011 :: Printing A Horizontal And Vertical Page In 1 Workbook?

Mar 18, 2014

Designing a proposal on MAC EXCEL 2011

1 workbook with:

1 page needs to print vertical

1 page needs to print landscape

Is this possible? (without reloading paper and printing a second time)

Right now I can only get it to print landscape OR portrait but not both ...

View 2 Replies View Related

Fitting Fixed Number Of Columns To Page Size For Printing?

Sep 24, 2011

I'm struggling with getting my Excel worksheet to fit nicely on the pg for printing to .pdf. I could tinker with column widths manually to work this out for a printed report. But I need to print a couple hundred reports with varying column widths, so I need a vba solution.

The context is that I'm using vba to process two sets of interlinked data on a worksheet. I only want to print one set of data, and keep the second set out of the print view. To do this, I'm keeping the first set of data in columns 1 to 10 and the second set of data in columsn 21 to 30. I set the print range to only include columns 1 to 10.

This works fine for keeping the second set of data off the printed pg. The problem is that there is always a gap between the end of column 10 and the maximum width of the printed pg. Given the formatting of the report, this doesn't look very good.

I know that page setup offers the "fit to" option. This would work if I wanted to fit everything on the worksheet on the pg, but I don't. I just want to fit columns 1 to 10 to the pg. Is there a way to do this, allowing for varying widths in columns 1 to 10? Is there a way to do it via vba?

View 2 Replies View Related

Page Breaks Result In Blank Pages Printing When AutoFilter Used

Jan 30, 2008

I have a sheet with a few hundred rows of data which I filter out by using a very simple autofilter. I have set page breaks throughout the whole sheet on certain rows I need to start on a new page. If the auto filter filters out any of these rows when it prints it prints a blank page where that row would have been before it was hidden by the autofilter.

For example the whole list is say 5 pages (set with page breaks) I apply an auto filter that now reduces it down to 2 pages say the 1st and last page of the original list. If I page break preview it, it shows me that it will be 2 pages but when i print preview/print the sheet it prints the 1st page then 3 blank pages then page 5 even know that the page break preview only shows and numbers 2 pages. Because the original page breaks are still there just are hidden by the autofilter so it adds them in as blank pages

View 4 Replies View Related

Excel 2010 :: Print Hundreds Of 6 Column Charts Using Maximum Page For Printing

Apr 28, 2013

I am using Excel 2010

I have over 800+ pages of chart that only takes up 6 columns and around like 9000+ rows.

I wanted to print this chart on paper and need hardcopies. However, the chart in its current setup prints only on the left half of the page leaving the right half empty.

How do i make use of the full space properly? Each chart has a "page number" on it so I want the chart to print continuously from one half of the page onto the next half and then the second page, third, etc.

Here is a visual demonstration of how things currently are and how i'd like to get them to be:

As you can see, This is the first of many charts and its numbered Page 9 and next one is page 10.

Pic1

How this looks when i try to print, it's only on the left side. right is all blank
Pic2

How i want it to look like upon printing
Pic3

As you can see in the last picture, once page 14 chart has no space it automatically continues chart on right side of page and then moves on to print rest.

[URL]

View 7 Replies View Related

Conditional Printing To Pdf Writer

Jul 30, 2007

I have a document, which needs to be collated each month and printed to PDF.

I have already worked out a way to collate all the summaries I need just for printing and in to position them in the correct order but I need help with the selection of printer.

I recorded a macro, selecting my PDF writer, which works fine.

However, certain people have different printer names for PDF writer around the office, which means I need to input some kind of If iserror procedure to enable different PDF writer selections.

Inevitably, when the macro fails to find the printer specified in the module, an error occurs.

how I can more or less include conditions around the printer selection?

View 4 Replies View Related

Create Conditional Page Breaks

Jul 8, 2006

I have the following code that I am using to create conditional page breaks. It works sporadically. It will work on the data I used when i set up the code. It will sometimes work on smaller amounts of data. It will sometimes insert the page breaks but then error out at line: ActiveSheet.HPageBreaks.Add Before:= Cells(row_index + 1, "D"). I do not understand this code entirely as a i am novice VB user. Once I get this code to work, I'd love to imrove it so that the page breaks ends when there is no data in last row or last column.

Sub PageBreak()
Dim lastrow As Long
Dim row_index As Long
lastrow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
For row_index = lastrow - 1 To 2 Step -1
If Cells(row_index, "D").Value <> "" Then
'insert page breaks ever time value in column D changes
If IsNumeric(Cells(row_index, "D").Value) Then
If Cells(row_index, "D").Value <> Cells(row_index + 1, "D").Value Then
ActiveSheet.HPageBreaks.Add Before:=Cells(row_index + 1, "D")
End If
End If
End If
Next

View 2 Replies View Related

Conditional Insert Of Page Breaks

Mar 20, 2007

I have a spreadsheet that is 7 columns wide and contains blocks of data. The data blocks vary in size typically between 3 and 12 rows. Between each block of data is a blank row (there are no blank rows within the data blocks). There may be up to 500 rows in the spreadsheet consisting of maybe 30 varying size blocks of data.

I am attempting to produce a Macro that will insert page breaks into the spreadsheet, the requirement being that non of the blocks of data are split across two pages. I would need to be able to input the available number of rows per page (to allow for headers and footers), the Macro would then need to count down that many rows, find the last blank line before that point and insert a page break. It would then need to count from the position of the inserted page break to determine where to place the next page break etc.

View 4 Replies View Related

Page Break Preview It Shows The Page Numbers In The Centre Of The Page

Jun 9, 2009

When I view a sheet under Page Break Preview, it shows the Page numbers in the centre of the Page. While I am aware that it would not print the page number I was wondering if there is an option to remove/hide the page numbers.

View 3 Replies View Related

Insert Conditional Horizontal Page Breaks Around Logical/Visual Blocks

Apr 28, 2006

I run a report that has several blocks of information with blank rows separating them. The blocks change from time to time and across pages so they are not always in the exact same rows.

I'd like a macro that can insert page breaks around a certain number of rows (say 60), but not insert one between two rows that have any content. If the page break would fall between two filled rows I'd want it to go to the nearest blank row instead.

The pages would be about the same size but the blocks of information would not be broken up. That's my idea, anayway. I don't know VB so I can't be sure it's even possible.

Provided this is possible, I'd greatly appreciate the help, as would all the other people in my organization who have to do this on a daily basis.

View 7 Replies View Related

Printing Multiple Workbooks With Printing Preference As Landscape

Jan 15, 2012

I would like to know if there is a way to print several different workbooks at once but keeping my printing format which I would like to be Landscape and Fit to one page. Reason is simple as I work in a office where staff is handed in several jobs to do everyday. They finish the jobs and log all the info on the database. I log on to database and put all their daily diaries and because it is all over the place I have to go in each file and set printing preferences which takes an hour in the morning and hour in the evening. I could do with some sort of automation where all diaries are automatically printed in Landscape and Fit on one page.

View 2 Replies View Related

Printing / Not Printing Ranges Based On Cell Contents

Apr 11, 2008

I have a report that is generated from a manufacturing process that looks like the example below. the report is 40 pages long when all the data is printed. i am looking for a way to only print this range if a dimension is "out of tolerance". if the dimension is within tolerance, there is always the "garbage" text of plus and minus. if every row is "within tolerance" in the range the cells in the OutTol column would all contain the "garbage" text but it will not always be identical. so, in summary, actual OutTol values = print and all "garbage" = not printed.

NomActDevLoTolUpTolOutTol
Y-0.956-0.9480.008-0.0030.0030.005
Z-1.413-1.4130.000-0.0030.003---*|++++
DIA0.4220.4240.002-0.0030.006----|+*++
POS0.0160.0110.005

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved