Macro to input total copies from a cell value

G

Guest

Using Excel 2003, I'm looking for a macro code that:
-Default an specific printer before start printing (if possible, if not user
can do it manually)
-Print a range name
-Before printing range name, take value from a specific cell and use it as
the number of copies to print, if cell value = 0 or blank don't print.

If someone can help me out I'll really appreciate it... Thanks in advance!
 
G

Guest

This is the macro I use to do that which you ask. I have not modified for
your specific application but it should be easy for you to do:

Sub print_weekly()
Dim LS As Integer
Dim Init As Integer
Dim VC As Integer
Dim VR As Integer
Dim SS As Integer
Dim RS As Integer

Dim LSp As String
Dim Initp As String
Dim VCp As String
Dim VRp As String
Dim SSp As String
Dim RSp As String

RS = Sheets("control").Range("E33").Value
LS = Sheets("control").Range("E34").Value
Init = Sheets("control").Range("E35").Value
VC = Sheets("control").Range("E36").Value
VR = Sheets("control").Range("E37").Value
SS = Sheets("control").Range("E38").Value

RSp = Sheets("control").Range("g33").Value
LSp = Sheets("control").Range("g34").Value
Initp = Sheets("control").Range("g35").Value
VCp = Sheets("control").Range("g36").Value
VRp = Sheets("control").Range("g37").Value
SSp = Sheets("control").Range("g38").Value

Sheets("Roll").PrintOut Copies:=RS, ActivePrinter:=RSp
Sheets("LineSchedule").PrintOut Copies:=LS, ActivePrinter:=LSp
Sheets("Init").PrintOut Copies:=Init, ActivePrinter:=Initp
Sheets("VeilCoord").PrintOut Copies:=VC, ActivePrinter:=VCp
Sheets("Veils").PrintOut Copies:=VR, ActivePrinter:=VRp
Sheets("SessionStarter").PrintOut Copies:=SS, ActivePrinter:=SSp

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top