+ Reply to Thread
Results 1 to 4 of 4

Copying contents of an activesheet to another worksheet

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Copying contents of an activesheet to another worksheet

    Hi,
    I am very new to macros but need to implement them on a project. Have been trying to work on my own and learnt a lot but due to time constraint, need help now.
    I am trying to do the following -

    1. Open an excel file (with some formatting macros)
    2. As soon as this file opens, a dialogue box opens asking for the source excel file. (The source excel file is extracted from the internet and the name is variable with dates).
    3. On entering the location, the source filer opens up (simultaneously with our destination file opened up) and the data from the only available sheet from the source file gets copied to the first sheet on our destination file)

    I am able to have the dialogue box and have the source file open up but I am not able to select the source file as active sheet and copy the data on the destination file (which wee know the name and path for)

    This is the file with the dialogue box macro:
    https://www.dropbox.com/s/bzapyxqjxx...Worksheet.xlsm

    Thanks in advance,
    Raunaq

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Copying contents of an activesheet to another worksheet

    Hi,

    Is this the sort of thing you are looking for?

    I have commented in your VBA code to help you understand the changes that I made. Let me know how you go
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Exclamation Re: Copying contents of an activesheet to another worksheet

    That works perfectly, thanks a lot!
    There's another thing I needed help with, probably the last for this project.

    The data copied has some empty cells in it. What I am looking to do is incorporate a macro to find empty cells (row wise) and then shift the cells next to the empty cells towards the left. Please suggest code to do that.

    Thanks in advance,
    Raunaq

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Copying contents of an activesheet to another worksheet

    Hi Raunaq,

    You're welcome, I'm glad I could help.

    Could you please mark this thread as solved and click on the * next to my post to say thanks, and then start a new thread for your next question as it is a new question.

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create code to recreate ActiveSheet contents at run-time
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 97
    Last Post: 03-12-2014, 06:54 PM
  2. [SOLVED] Copying contents of a specified cell from 1 worksheet to another
    By mathew086 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2012, 12:58 PM
  3. Copying contents of a cell from another worksheet
    By Barking_Mad in forum Excel General
    Replies: 2
    Last Post: 11-17-2009, 10:26 AM
  4. Copying specific cells from worksheet to activesheet
    By pprseller in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2009, 06:28 PM
  5. Copying new activesheet after other activesheet is hidden?
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2006, 05:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1