I have an excel sheet with 7 different 'forms' on it ranging from A1:O43, A44:O77, A78:O111, A112:O145, A146:O167, A168:O189, A190:O220. Each form is on 1 page. If a form is not used, I have made buttons to hide the form on the workpage (code below) but it would still print a blank page (I know you can manually change print areas/print selection). The last form (A190:O220) is a totals page which should only be added to the print area if 2 or more forms are used. Im looking for a solution to include/remove these forms from the print area when their respective buttons are clicked to show/hide them from the worksheet (if possible). If this is not possible, an alternative would be to have a new macro to set the print area to current active cells (not including the hidden rows of forms not in use). Im not advanced at coding so I have essentially been going through each possible combination of forms (code below) that have a value on them to include in the print area. Im sure there is a much faster method out there.. any help would be appreciated. Thanks!
Button to hide/show 1 of the forms (for example):
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Bookmarks