![]() |
Formulas
I have a worksheet, which has 4 printable pages. I want a message box to ask
which page is to be printed, and how many copies. Is this possible?? |
Formulas
File Print
will bring up a dialog box that you can use to select the pages to print and the number of copies -- Gary''s Student - gsnu200714 "izzyt1972" wrote: I have a worksheet, which has 4 printable pages. I want a message box to ask which page is to be printed, and how many copies. Is this possible?? |
Formulas
Option Explicit
Sub testme() Dim WhichPage As Long Dim HowMany As Long WhichPage = Application.InputBox(Prompt:="Which Page?", _ Default:=1, Type:=1) If WhichPage < 1 _ Or WhichPage 4 Then Exit Sub End If HowMany = Application.InputBox(Prompt:="How Many?", _ Default:=1, Type:=1) 'stop typos If HowMany < 1 _ Or HowMany 10 Then Exit Sub End If Worksheets("sheet1").PrintOut from:=WhichPage, to:=WhichPage, _ copies:=HowMany, preview:=True End Sub izzyt1972 wrote: I have a worksheet, which has 4 printable pages. I want a message box to ask which page is to be printed, and how many copies. Is this possible?? -- Dave Peterson |
Formulas
Your subject line reads "Formulas" but your body message requires VBA since
formulas cannot print pages. Sub Print_Out() Dim TotPages As Long Dim m as long Dim y As Long Dim CopyNum as Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet.PageSetup y = InputBox("Which Page?") m = InputBox("How many Copies") End With For CopyNum = 1 To m ActiveSheet.PrintOut From:=y, To:=y Next End Sub Gord Dibben MS Excel MVP On Wed, 11 Apr 2007 11:36:03 -0700, izzyt1972 wrote: I have a worksheet, which has 4 printable pages. I want a message box to ask which page is to be printed, and how many copies. Is this possible?? |
Formulas
Hi,
Create and Print as custom view 1. On the View menu, click Custom Views. 2. In the Views box, click the name of the view you want to print. 3. Click Show. 4. Click Print . Note Microsoft Excel saves previously defined print areas for each sheet in the workbook with your view. If a sheet has no defined print areas, Microsoft Excel prints the entire worksheet. Challa Prabhu "izzyt1972" wrote: I have a worksheet, which has 4 printable pages. I want a message box to ask which page is to be printed, and how many copies. Is this possible?? |
All times are GMT +1. The time now is 04:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com