View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ulfah ulfah is offline
external usenet poster
 
Posts: 1
Default Macro to Print several worksheets


I am using Excel 2000 SP-3 and Windows XP.

I am recording a macro to print a specific, selected area (say B4:D7)
in All _-Visible-_ Worksheets.
I have 13 Sheets, all with specific names, always the same name, always
in the same order. The first and the last Sheets should
_always_be_excluded_ from being printed.
Any number of the remaining 11 sheets could be hidden, except 3! So I
have always between 3 - 11 sheets to print, never knowing how many or
which one is the last (of the visible) sheets.

I record this operation as follows;
I hide "the First" and "the Last" sheet, I Select the 2nd Sheet (now
the first of the visible sheets), then Select B4:D7, I right click the
sheet tab and choose Select All Sheets and define the print format of
the selection. Then Print and Print selection.
When still having all visible sheets selected I select "A1" (to clean
up all views).
Finally unhide "the First" and "the Last" sheets.
I select "the First" sheet and select "A1", to be at the starting point
again.

When _-Recording-_ this sequence it works perfectly!! I get all visible
worksheets printed, with the choosen format !!

But when _-Running_the_macro-_ I only get the first of the visible
sheets printed!

Can anyone tell me why this happens??

Many thanks in advance
Ulf


--
ulfah
------------------------------------------------------------------------
ulfah's Profile: http://www.excelforum.com/member.php...o&userid=29204
View this thread: http://www.excelforum.com/showthread...hreadid=489381