Elania Rodriguez
asked on
Create a macro to print two copies changing a data validation list on 2nd copy
I want to create a macro that will print two copies of a worksheet.
The first print will be the "white copy" I'm using a data validation list to select White Copy, and the second print will be the "yellow copy" which is the other option in the list. When I record the macro and make the selection it does not recognize the selection change in the list. How do I get it to recognize the selection and print according to it?
I got it to work, but it is now giving me a runtime error 1004
Here is what I'm using"
Sub Printer()
'
' Printer Macro
'
'
ActiveWindow.SelectedSheet s.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("I5:K5").Value = Split(Range("I5").Validati on.Formula 1, ",")(1)
ActiveWindow.SelectedSheet s.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("I5:k5").Value = Range(Range("I5:k5").Valid ation.Form ula1)(2)
End Sub
Can you tell me what I'm doing wrong?
The first print will be the "white copy" I'm using a data validation list to select White Copy, and the second print will be the "yellow copy" which is the other option in the list. When I record the macro and make the selection it does not recognize the selection change in the list. How do I get it to recognize the selection and print according to it?
I got it to work, but it is now giving me a runtime error 1004
Here is what I'm using"
Sub Printer()
'
' Printer Macro
'
'
ActiveWindow.SelectedSheet
IgnorePrintAreas:=False
Range("I5:K5").Value = Split(Range("I5").Validati
ActiveWindow.SelectedSheet
IgnorePrintAreas:=False
Range("I5:k5").Value = Range(Range("I5:k5").Valid
End Sub
Can you tell me what I'm doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Could you send a dummy?
A solution according to author's comment
ASKER
Subscript out of range
It did work but with an error