View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Print number of copies box

Sub PrintLogsheet()
Dim num as String
num = InputBox("enter number of copies")
if num = "" then
num = 1
elseif not isnumeric(num) then
num = 1
end if
Application.ScreenUpdating = False
Range("A1:M37").Select
Selection.PrintOut Copies:=clng(num), Collate:=True
Range("A1").Select
Application.ScreenUpdating = True
End Sub



"EMoe" wrote in message
...

Hello Programmers!

I have this code to print a portion of a worksheet.

Sub PrintLogsheet()
'
Application.ScreenUpdating = False
Range("A1:M37").Select
Selection.PrintOut Copies:=1, Collate:=True
Range("A1").Select
Application.ScreenUpdating = True
End Sub

How do I insert code, that when I click the macro button, a box pops up
asking how many copies to print? After entering the required amount,
click OK, then the code continues out to print the copies.

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile:

http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=491788