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.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
     Range("I5:K5").Value = Split(Range("I5").Validation.Formula1, ",")(1)
   
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
     Range("I5:k5").Value = Range(Range("I5:k5").Validation.Formula1)(2)
End Sub

Can you tell me what I'm doing wrong?
Elania RodriguezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

pls try
Sub Printer()
'
' Printer Macro
'

'
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
     Range("I5:K5").Value = Split(Range("I5").Validation.Formula1, ",")(1)
    
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
     Range("I5:k5").Value = Split(Range("I5").Validation.Formula1, ",")(2)
End Sub

Open in new window

Regards
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Elania RodriguezAuthor Commented:
Run-time error '9';
Subscript out of range

It did work but with an error
0
Rgonzo1971Commented:
Could you send a dummy?
0
Rgonzo1971Commented:
A solution according to author's comment
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.