+ Reply to Thread
Results 1 to 5 of 5

Copy data from one worksheet into new tab of a different workbook

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    MK, UK
    MS-Off Ver
    Excel 2003
    Posts
    70

    Smile Copy data from one worksheet into new tab of a different workbook

    Hi

    I have this code that opens a new tab in a workbook called Randomstowreprots every two hours and renames it with date and time.

    What I would like is all the data from the workseet "Current" in the workbook "Current" (which is the workbook running the create new tab macro) copied to the new tab once its made.

    HTML Code: 
    Cheers

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Copy data from one worksheet into new tab of a differet workbook

    Not tested but maybe:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    10-08-2010
    Location
    MK, UK
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Copy data from one worksheet into new tab of a different workbook

    Hi

    Thanks for the code, it came up with a run time error "object required"
    and highlighted the below.

    It did create a new tab first.


    Set wsNewSheet = .Sheets.Add(After:=.Sheets(.Sheets.Count)).Name _
    = Format(Date, "dd-mmm-yyyy") & " " & Format(Time, "hh-mm")

    thanks

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Copy data from one worksheet into new tab of a different workbook

    Maybe try:

    Please Login or Register  to view this content.

    Dom

  5. #5
    Registered User
    Join Date
    10-08-2010
    Location
    MK, UK
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Copy data from one worksheet into new tab of a different workbook

    Hi Dom

    Thanks, that worked a treat.

    Would you know how to change it form running every 2 hours, to running at set times ie. 10:00 the 12:00 etc..

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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