View Single Post
  #3   Report Post  
gocats
 
Posts: n/a
Default

Thanks Dave,

Before I test it, what do I require at the start for it to be in VB code,
and how can I alter the time delay before the next 'batch' is sent?

"Dave Peterson" wrote:

Maybe you could use a macro to print what you want in groups of 20.

Option Explicit
Sub testme()

Dim HowManyTotal As Long
Dim HowManyPerGroup As Long
Dim HowManyLastTime As Long
Dim HowManyThisTime As Long
Dim MaxTimes As Long
Dim pCtr As Long

HowManyPerGroup = 20

HowManyTotal = CLng(Application.InputBox(prompt:="how many copies", _
Type:=1))

If HowManyTotal < 1 Then
Exit Sub
End If

MaxTimes = HowManyTotal \ HowManyPerGroup
HowManyLastTime = HowManyTotal Mod HowManyPerGroup

If HowManyLastTime = 0 Then
'evenly divided
HowManyLastTime = HowManyPerGroup
Else
'oh,oh, there was a remainder
'(ask for 312 in groups of 20 means the last time will get 12)
'get those last few
MaxTimes = MaxTimes + 1
End If

For pCtr = 1 To MaxTimes
If pCtr = MaxTimes Then
HowManyThisTime = HowManyLastTime
Else
HowManyThisTime = HowManyPerGroup
End If
ActiveSheet.PrintOut preview:=True, copies:=HowManyThisTime
Next pCtr

End Sub

I print previewed the activesheet. Remove the preview:=true and change what you
want printed when you're done testing.

gocats wrote:

Despite upgraging the printer memory, if the number of print copies is less
than 20 , the laser churns out the copies one after the other. However if
when say 100 print copies is requested, the printer slows between copies as I
understand the buffer is full. How can the number of copies be automated so
that up to 20 print copies per 'batch' is sent and when done the next 'batch'
of up to 20 is sent until the total number print copies is done.


--

Dave Peterson