![]() |
I need assistance getting VBA code to do the following...
I need to insert a code into an excel sheet that will do the following. I
need someone to completely spell out the code so I can just paste it into the editor. The spreadsheet is size A1:G2000 (there are a few formulas in H, I, and J, but they are NOT in any way causing the issue because the columns are hidden). Due to cell formatting, when I print the spreadsheet it prints ALL 2000 lines even though the cells are blank. The point of the spreadsheet is to be able to add line items into the 2000 lines (minus the repeating row headings) when needed and ONLY print the completed lines, NOT the blank ones below. I need a code that will: When File|Print is selected it will filter out unused rows below so that it will ONLY print rows if there is information entered into column A of that row. Repeat rows 1:7 on every sheet. Reset the filter so that the page re-displays correctly again once the printing is done (unfilters) Thanks in advance!! |
I need assistance getting VBA code to do the following...
SD,
Try recording a macro of you desired actions, view the code and see which parts you need help with. Look at the BeforePrint event and the code to filter a WS. NickHK "SD" wrote in message ... I need to insert a code into an excel sheet that will do the following. I need someone to completely spell out the code so I can just paste it into the editor. The spreadsheet is size A1:G2000 (there are a few formulas in H, I, and J, but they are NOT in any way causing the issue because the columns are hidden). Due to cell formatting, when I print the spreadsheet it prints ALL 2000 lines even though the cells are blank. The point of the spreadsheet is to be able to add line items into the 2000 lines (minus the repeating row headings) when needed and ONLY print the completed lines, NOT the blank ones below. I need a code that will: When File|Print is selected it will filter out unused rows below so that it will ONLY print rows if there is information entered into column A of that row. Repeat rows 1:7 on every sheet. Reset the filter so that the page re-displays correctly again once the printing is done (unfilters) Thanks in advance!! |
All times are GMT +1. The time now is 04:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com