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

  • Home
  • SEARCH
  • 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 8510447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:42:27+00:00 2026-06-11T03:42:27+00:00

This should be really simple, but I’ve been trawling forums and SO answers for

  • 0

This should be really simple, but I’ve been trawling forums and SO answers for hours to find the answer with no luck, so am (reluctantly) creating a question of my own.

What I’m trying to do is simply create a new workbook, and paste a range from another workbook into that workbook. Sounds simple..?

My original workbook, let’s call Book1. I’m trying to create a new workbook, Book2, which I will copy the values of cells A1:B10 to.

Here’s one version of my code (starting with Book1 open):

Range("A1:B10").Copy
Set NewBook = Workbooks.Add
    With NewBook
        .SaveAs Filename:="Book2.xls"
    End With
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False

This gives a “PasteSpecial of Range class failed” error. I have tried the following fixes with no luck:

  • added ‘Workbooks(“Book2.xls”).Activate’ to the code
  • removed the extra arguments in the PasteSpecial line
  • tried ‘.Paste’ instead of ‘.PasteSpecial’
  • changed ‘Selection.PasteSpecial’ to ‘ActiveSheet.PasteSpecial’
  • explicitly referencing the copy range, including the workbook and sheet reference
  • creating the new workbook first, then performing the copy, before reactivating the new workbook and pasting

None of the above solutions work… any wisdom at this stage would be gratefully received!

  • 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-11T03:42:29+00:00Added an answer on June 11, 2026 at 3:42 am

    Is this what you are trying? I have commented the code so that you shouldn’t have any problem understanding what the code does.

    Option Explicit
    
    Sub Sample()
        Dim wbI As Workbook, wbO As Workbook
        Dim wsI As Worksheet, wsO As Worksheet
    
        '~~> Source/Input Workbook
        Set wbI = ThisWorkbook
        '~~> Set the relevant sheet from where you want to copy
        Set wsI = wbI.Sheets("Sheet1")
    
        '~~> Destination/Output Workbook
        Set wbO = Workbooks.Add
    
        With wbO
            '~~> Set the relevant sheet to where you want to paste
            Set wsO = wbO.Sheets("Sheet1")
    
            '~~>. Save the file
            .SaveAs Filename:="C:\Book2.xls", FileFormat:=56
    
            '~~> Copy the range
            wsI.Range("A1:B10").Copy
    
            '~~> Paste it in say Cell A1. Change as applicable
            wsO.Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
        End With
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like it should be really easy but I couln't find an answer
This should be really simple, but I have tried many solutions posted on the
This seems like it should be really simple, but I'm unable to figure this
This should be really simple but I'm a javascript/jQuery rookie, so here we go:
This should be really simple but I can't get it to work, how do
This should be really simple, but what is the way to go on this.
Ok this should be really simple, but I am doing my head in here
I know this should be really simple, but im having trouble getting this to
I'm cocking this up and it should be really simple but the value of
This is frustrating me. It should be something really simple but I can't get

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.