copy and paste vb

Can some please help with the below.

Excel VB crashes on the paste section. Not sure why.
For temp_indx = 1 To temp_num_sheets
    Sheets(Array("one", "Chart_2")).Select
    Sheets(Array("one", "Chart_2")).Copy
    Sheets(Array("one", "Chart_2")).Paste 
    Sheets(Array("one", "Chart_2")).Protect Password:="asdf", DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheets(Array("one", "Chart_2")).Select
Next

Open in new window

jk_12Asked:
Who is Participating?
 
MakriniConnect With a Mentor Commented:
try

    Sheets(Array("one", "Chart_2")).Copy Before:=Sheets(1)

Open in new window

0
 
MakriniCommented:
Looks to me like you are copying two sheets and trying to paste them on top of themselves multiple times.

  What are you actually trying to acheive?
0
 
jk_12Author Commented:
Thank you for the response.

I have an excel file which creates five unique reports. (Company 1, Company 2, etc).

Right now, it's 1 sheet report. I'm trying to add a second sheet into the automation process.
0
 
jk_12Author Commented:
Thanks very much.
0
 
MakriniCommented:
Glad to help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.