ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing Help (https://www.excelbanter.com/excel-programming/342648-printing-help.html)

Greg B[_6_]

Printing Help
 
I have to print 3 different sheet How can I get a inputbox to ask a user how
many copies they would like to print?
the sheets are called

resultsmain
mainladder
thirdsheet


Thanks in advance

Greg



Dave Peterson

Printing Help
 
Maybe something like:

Option Explicit
Sub testme()

Dim HowMany As Long
HowMany = CLng(Application.InputBox(Prompt:="How many?", Type:=1))

If HowMany < 1 Then
Exit Sub
End If

Worksheets(Array("resultsmain", "mainladder", "thirdsheet")).PrintOut _
copies:=HowMany

End Sub

Greg B wrote:

I have to print 3 different sheet How can I get a inputbox to ask a user how
many copies they would like to print?
the sheets are called

resultsmain
mainladder
thirdsheet

Thanks in advance

Greg


--

Dave Peterson

Greg B[_6_]

Printing Help
 
Thanks for that Dave

Greg
"Dave Peterson" wrote in message
...
Maybe something like:

Option Explicit
Sub testme()

Dim HowMany As Long
HowMany = CLng(Application.InputBox(Prompt:="How many?", Type:=1))

If HowMany < 1 Then
Exit Sub
End If

Worksheets(Array("resultsmain", "mainladder", "thirdsheet")).PrintOut _
copies:=HowMany

End Sub

Greg B wrote:

I have to print 3 different sheet How can I get a inputbox to ask a user
how
many copies they would like to print?
the sheets are called

resultsmain
mainladder
thirdsheet

Thanks in advance

Greg


--

Dave Peterson





All times are GMT +1. The time now is 05:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com