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 7519801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:57:45+00:00 2026-05-30T01:57:45+00:00

I have a sheet Rolling Plan in copy.xls worksheet.I want to copy it to

  • 0

I have a sheet Rolling Plan in copy.xls worksheet.I want to copy it to Book1.xls worksheet in Sheet NO1 in Range A1:H6

The macro in Book.xls

  Sub CopytoPS()
   Dim sfil As String
   Dim owbk As Workbook
   Dim sPath As String

   sPath = "C:\Users\Nirmala\Desktop\website" 'Change the file path for your purposes
   sfil = Dir(sPath & "copy.xls")

   Range("B6:H6").Copy
   Set owbk = Workbooks.Open(sPath & sfil)
   owbk.Sheets("RollinPlan").Range("B6:H6").End(xlUp).Offset(1, 0).
   PasteSpecial  xlPasteValues
    owbk.Close True 'Save opened workbook and close
    sfil = Dir

End Sub

  • 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-05-30T01:57:46+00:00Added an answer on May 30, 2026 at 1:57 am

    This does the following:

    1) Open copy.xls and copy data in range B6:H6

    2) Pastes the data into workbook Book1 in range A1:H6 on sheet NO1

    Sub CopyData()
        Dim filePath As String, wb As Workbook
    
        filePath = "C:\Users\Nirmala\Desktop\website" 'Change the file path for your purposes
        Set wb = Workbooks.Open(Filename:=filePath & "\" & "copy.xls")
    
        wb.Worksheets("Rolling Plan").Range("B6:H6").Copy Destination:=ThisWorkbook.Worksheets("NO1").Range("A1:H6")
        wb.Close
    End Sub
    

    Note that I am not quite sure why the data range you are copying to (i.e. A1:H6) is much larger than the actual copied range (i.e. B6:H6).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have style sheet with a class name changebackgroundcolor i want make change in
I have a sprite sheet and I want to display images next to each
i have an excel sheet with 2 sheets what i want is to loop
I have AutoFilter in place in my sheet. I want to sort data using
I have a sheet with an chart in it. I am using another sub
I have excel sheet with data which I want to get Levenshtein Distance between
I have a sheet that I use an Excel VBA macro to automatically fill
=VLOOKUP(VALUE($B$100);INDIRECT(2011.xls!&D$101;0);3;0) I have a sheet to send other people but i cannot send 2011.xls
I want to have a sheet with several rows, each with a '+' button.
I have an excel sheet similar to : I want to read data columns

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.