MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Excel macro issue

Posted by Sunitha on December 14, 2001 7:44 AM

I am new to excel macro. I wrote a macro and it works fine but for some reason it adds on about 1000 or so blank pages at the end. Can someone tell me how to delete all these pages so that someone who prints the worksheet doesnot get all the 1000 pages but only get the portion that has any data?

Posted by Joe Was on December 14, 2001 7:58 AM

...his conditional, "if two or more rows..."
requires an array formula anyway. And, I'm
reluctant to use SUMPRODUCT with only 1
argument since Help specifies that its
arguments should be "2 to 30 arrays..."
I'd be more inclined to use...


Posted by Tom D. on December 14, 2001 11:01 AM

I assume this is a print macro. What have you designated as the print area? if the data to be printed does not form a squaare, you may be getting a lot of blank cells being printed. If this is the case, you can either specify which pages to print, or break the print commands into 2 parts, each specifying a different area of data as the print area.

Posted by Sunitha on December 14, 2001 11:36 AM

Thanks for responding. THe problem is this is a macro that is supposed to work with all kinds of data. So, I want to know how to code the macro so that it can set the Print Area at the end.