Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:56:15+00:00 2026-06-09T06:56:15+00:00

I have this workbook: I need to have a macro button that my users

  • 0

I have this workbook:
I need to have a macro button that my users can click that say “Click Here to Copy”, then i need a code that copies rows number 5-25 of sheet titled “TC-Star Here”, and i need the copied rows to be inserted (i need the pasted rows to not auto delete the ones that were there previously, so the inserted rows would have to shift the previous ones down) into another sheet named “Time Cards”. The inserted rows, i need to have to code insert them starting at cell A1. So everytime the macro button is clicked, rows are copied, and inserted with the previous data unmodified/deleted.

I have this code so far:

Sub CopyInfo()
On Error GoTo Err_Execute
    Sheet2.Range("A1:F11").Value = Sheet1.Range("A1:F11").Value
    Sheet1.Range("A1:F11").Copy
    Sheet2.Range("A1").InsertCopiedCells
Err_Execute:
    MsgBox "All have been copied!"

End Sub

But everytime the button is clicked, it pastes the rows over the existing rows.

Please Help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:56:17+00:00Added an answer on June 9, 2026 at 6:56 am

    Is this what you are trying?

    Sub CopyInfo()
        On Error GoTo Err_Execute
    
        Sheet1.Range("A1:F11").Copy
        Sheet2.Range("A1").Rows("1:1").Insert Shift:=xlDown
    
    Err_Execute:
        If Err.Number = 0 Then MsgBox "All have been copied!" Else _
        MsgBox Err.Description
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code to copy a sheet from a Workbook in VBA/Access to
I have this code: app = new Application(); app.Visible = false; workbook = app.Workbooks.Add(1);
I have a macro that is on a server. I need to be able
I have a need to copy a worksheet from one workbook into another and
I have an excel workbook that uses VBA. This VBA works fine except when
I have an Excel file that has a bunch of VBA and macro code
Can anyone please help me. I have developed macro that keeps track of huge
I have written sub main () 'some code goes here end sub This is
I have a macro-enabled WorkBook. I need to specify the current folder in which
I have this code that aggregates multiple workbooks into a preview file where all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.