How do I clear a print area in Excel VBA?

How do I clear a print area in Excel VBA?

2# click “Page Layout”-> “Print Area”-> “Clear Print Area”.

How do I clear Set Print Area?

Clear a print area

  1. Click anywhere on the worksheet for which you want to clear the print area.
  2. On the Page Layout tab, in the Page Setup group, click Clear Print Area.

How do I set print area in Excel macro?

Using a Macro to Set a Print Range

  1. Press Ctrl+F3.
  2. Click New.
  3. In the Name field, enter the following as a name: Print_Area.
  4. Using the Scope drop-down list, choose the worksheet that contains the cell (C7) that contains the print range.
  5. In the Refers To field, enter the following formula: =INDIRECT(Sheet1!$C$7)
  6. Click OK.

Can’t clear print area in Excel?

To clear the print area, follow these steps:

  1. Display the Page Setup tab of the ribbon.
  2. In the Page Setup group, click Print Area. Excel displays a menu containing two choices.
  3. Choose Clear Print Area from the menu.

Why can’t I clear the print area in Excel?

If your Excel spreadsheet isn’t printing properly, clearing or setting a print area can often help. Sometimes the wrong print area has already been set, in which case you want to clear it. To do this from the Page Layout Ribbon, click the Print Area icon and select Clear Print Area.

How do I remove print formatting in Excel?

How to clear all formatting in Excel

  1. Select the cell or range of cells from which you want to clear formatting.
  2. On the Home tab, in the Editing group, click the arrow next to the Clear button.
  3. Select the Clear Formats option.

How do you set a dynamic print area in Excel?

Select the range with data you will set as print area (in this case, we select A1:E5), then click Page Layout > Print Area > Set Print Area. See screenshot: 5. Click Formulas > Name Manager to open the Name Manager dialog box.

How do I clean up VBA code?

You can click in the code window and hit Ctrl+A and then hit your Delete key. Double-click ThisWorkbook, and make sure there’s no code in the code window. You may also have something called a Module and your Project Explorer window will look more like the one below. Right-click any modules and choose Remove.

How do you set a blueprint area in Excel?

Highlight the cells you want to print by clicking on the first cell and holding down shift on your Mac or PC keyboard while clicking the other cells. 3. Click on the “Print Area” button in the top menu. Choose “Set Print Area.” Hit “Enter” or “Return” on your keyboard to set the print area.

How do I clear the print area in Excel VBA?

Paste the code into the code window that appears at right. Save the file, and close the VBE window (Alt + Q). Test the code: From any sheet inside desired workbook, press Alt + F8, double-click ClearPrintArea. All print areas in workbook should be cleared.

How to set print area in Excel spreadsheet?

To set Print Area in Excel spreadsheet, first select (highlight) Cells that we want to set as Print Area, and then navigate to ribbon Page Layout > Print Area > Set Print Area.

How to set print title in Excel VBA?

Excel VBA set Print Title In case the number of records (rows) is so large that it takes more than 1 page to print all the data, we need to ensure all pages contain the field headers on top of each page. In Excel spreadsheet, we set it under Page Layout > Print Titles > Rows to repeat at top In VBA, we set this using PrintTitleRows Property.

Is there a way to print the whole sheet?

If you’re wanting to print the whole sheet always, you can actually just clear the print area and it will default to the amount of the sheet that is filled with data. If you’re wanting not to hide some columns, wtfsven’s answer is perfect.

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top