+ Reply to Thread
Results 1 to 3 of 3

Copying a sheet within the workbook to another folder's after adding a sheet

  1. #1
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Question Copying a sheet within the workbook to another folder's after adding a sheet

    Hi VBA gurus,


    I have a workbook that I am opening up and inserting another worksheet into it then trying to copy a sheet from the exiting workbook, that contains the code, into the sheet I just inserted. I hope that makes sense? In other words, I have a workbook that runs code through a command button as it copies all the data from LinenData sheet into a folder Name 2013 after it has opened and inserted another sheet.

    Here is the code and I will include a sample of the workbook;
    Please Login or Register  to view this content.
    Thank You, LeapingLizard
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copying a sheet within the workbook to another folder's after adding a sheet

    I did not understand your problem
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Copying a sheet within the workbook to another folder's after adding a sheet

    Hi, LeapingLizard,

    why insert a sheet first and then copy another one`s contents into the new one and not take the original one and copy that? Is there any particular reason you copy Sheets("LinenData") anyhow no matter what the response from the MsgBox is?

    Please Login or Register  to view this content.
    Some words on your modules: you should delete the empty ones to make it clear where to find any code (and not just bulk through empty modules) and maybe add where to find your code. The Code in Module16 should reside in ThisWorbook as only from there the Workbook_Open-Event will get triggered. And if you could get used to indent the code this could help a quite a bit on recognising what you are after.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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. Macro - Copying from sheet 1 to sheet 2 and adding certain cells!
    By gavster89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2012, 03:23 PM
  2. Replies: 2
    Last Post: 06-09-2012, 09:08 AM
  3. VBA. Copying rows from one sheet to another sheet in another workbook with groups
    By satswid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2009, 10:38 PM
  4. Replies: 1
    Last Post: 11-11-2009, 05:54 PM
  5. copying sheet one from every workbook in a folder
    By Nick_in_Dubai in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-07-2009, 08:47 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