print macro

Tonyson

Board Regular
Joined
May 26, 2002
Messages
109
I did a search on this board for a print macro and found one that was submitted by Ian Mac back in 2/21/2002:


Sub PrintPages()
Dim f, t As Integer

f = InputBox("Select start page 1 to 10", "Print From")
t = InputBox("Select end page " & f & " to 10", "Print To")

If MsgBox("Do you wish to print pages " & f & " to " & t, vbYesNo, "Confirm print") = vbYes Then
ThisWorkbook.PrintOut f, t
Else
End If

End Sub

What I would like your help in editing this macro to print a worksheet not workpages with with the same MsgBoxes to print 1 to 11 pages in my worksheet. :eek:
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
hi there i have done the same type of macro and i need some help with the cancel option how do i have it so the macro jus finishes without a runtime error
thanks
 
Upvote 0
i hope i'm in the right spot here, my question.

i use a print macro to print a selection of the activesheet. but i want the number of copies to bedetermend trough a cel on the active sheet.
the code i use is;

Sub MyPrint()
curPrtArea = ActiveSheet.PageSetup.PrintArea
myPrtArea = "W43:AH63"
ActiveSheet.PageSetup.PrintArea = myPrtArea
ActiveSheet.PrintOut , Copies:=( must take digit out of cell C14 )
ActiveSheet.PageSetup.PrintArea = curPrtArea

End Sub

can you help me?
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top