New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

VBA to move files in another workbook and clear data from worksheets

Macros, VBA, Excel Automation, etc.

VBA to move files in another workbook and clear data from worksheets

Postby nikki-louise » Thu Jan 07, 2016 7:43 am

I have a bit of project I’m trying to put together and I wanted to know if I could get some pointers on some bits I’m having difficulty with.

What I want to do is have cells linked between two work documents (which I have included in this post). At the beginning of each week the users on of the source work book can press a button to run some VBA that will set everything up for the next week.
I want the code to:

• Go into the Destination workbook and move the data located in columns A-P rows 2-13 from ‘this week’s data’ worksheet to the first black line on the ‘archive’ worksheet. Then save and close this work book.
Then in the source work book I want to:
• Unshared the workbook
• Copy the sheet called ‘this week’ and rename it with the date located in cell 3B
• Clear the data from the cells indicated in yellow on the ‘source work book’ so it ready for the next week to be filled in.
• Reshare the workbook

I have set up the links and have been playing with some code to copy the data and duplicate the work sheet.
I am a bit stuck on the first bit which is moving the data in the destination work book from ‘this week’s data’ sheet to the first blank line of the ‘archive sheet’ but I want the code located in the source work book.
Also is there a way to clear all the yellow cells in the source workbook after copying that doesn't evolve me listing every single cell?
Any help points in the wright direction will be greatly apprenticed.
Thank you
  • 0

You do not have the required permissions to view the files attached to this post.
nikki-louise
Rookie
 
Posts: 15
Joined: Jun 21, 2015
Reputation: 0
Excel Version: 2010

Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 128 guests