#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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??

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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??


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default 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??



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
IF AND formulas docnige Excel Discussion (Misc queries) 4 June 16th 06 02:09 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"