daria-ekt
Дата: Понедельник, 28.07.2014, 13:33 |
Сообщение № 4
Группа: Пользователи
Ранг: Прохожий
Сообщений: 5
Репутация:
0
±
Замечаний:
0% ±
Excel 2007
Написала я примерно такой макрос для первых страниц, но неудобство в том, что при его написании приходиться вручную вводить имя листа, поскольку все они названы по разному [vba]Код
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П11 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В11 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В12 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В13 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В14 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В15 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В16 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В17 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД11 №").Select End Sub
[/vba]
Написала я примерно такой макрос для первых страниц, но неудобство в том, что при его написании приходиться вручную вводить имя листа, поскольку все они названы по разному [vba]Код
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П11 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В11 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В12 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В13 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В14 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В15 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В16 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В17 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД11 №").Select End Sub
[/vba] daria-ekt
Ответить
Сообщение Написала я примерно такой макрос для первых страниц, но неудобство в том, что при его написании приходиться вручную вводить имя листа, поскольку все они названы по разному [vba]Код
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ВД4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("П11 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В11 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В12 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В13 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В14 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В15 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В16 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("В17 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД1 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД2 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД3 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД4 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД5 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД6 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД7 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД8 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД9 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД10 №").Select ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 Sheets("ПД11 №").Select End Sub
[/vba] Автор - daria-ekt Дата добавления - 28.07.2014 в 13:33