+ Reply to Thread
Results 1 to 11 of 11

Create macro to copy current sheet to new folder and with new name of workbook

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Create macro to copy current sheet to new folder and with new name of workbook

    Dear Sir
    i would like to create macro with form key that when i press on it
    it create new file from current open excel sheet (in my example Label Sheet From Column A-Column F )
    in folder in the same directory with folder name is B2+C2 and new workbook name with H2

    in my example folder name will be A B#16 and workbook name Shi # 1 DFR

    please note that the file needed with extension XLSX

    regards
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Do you need to create new workbook for each row .. and to keep that row only and clear other data in the sheet exported ..?
    I think you need to give us more details ..
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Dear alpha frog
    Thanks for your reply
    Do you can reply me with how can I make this with excel

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    There are several step-by-step videos and guides to show you how. Just do a search for something like Excel paste a macro or Excel add a form button

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Dear Alphafrog
    i would like to know if we can save this data in column mention before as value because all this data in column coming from another sheet with function
    need export as value without formula
    regards

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Dear Alphafrog
    i would like to know if we can save this data in column mention before as value because all this data in column coming from another sheet with function
    need export as value without formula
    regards

  8. #8
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Dear AlphaFrog
    I have question about if i need to apply this code for another sheet in the same workbook , it's not work for me
    Please can advice me with Base code that can i use it for any sheet or folder do the same function (create new workbook with specific name in new folder with specific name also
    regards

  10. #10
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    Change this...
    Sheets("Label").Copy

    To this...
    ActiveSheet.Copy

    It will copy the currently active sheet to a new workbook. The rest of the code is the same assuming B2, C2, and H2 have the folder and workbook names as before.

  11. #11
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Create macro to copy current sheet to new folder and with new name of workbook

    can please write the code that can i used for any future example
    especially every sheet will have another range is different from another
    i will be thankful if you can make code with highlight for this variable can change according to my demands

+ 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. [SOLVED] To create a file folder in the current workbook location and export the file
    By Ravana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2016, 07:30 AM
  2. [SOLVED] Creating a VBA Script to save in a current month's folder (create folder as needed)
    By spittingfire in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-15-2015, 03:08 PM
  3. Macro to Create "portable" Hyperlinks to Files in Current folder WITHOUT Drive letter?
    By whywhybother in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2013, 12:51 PM
  4. [SOLVED] Copy Values From Each Workbook in Folder to a Single Sheet in New Workbook +Workbook names
    By Arsham24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 07:42 PM
  5. [SOLVED] Copy All Sheets From Each Workbook in Folder to a Single Sheet in New Workbook
    By DHartwig35805 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2012, 03:53 PM
  6. Copy workbook to current folder
    By DavidW in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2006, 04:53 PM
  7. How to copy a sheet from a workbook to another in different folder
    By kurt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 04:05 PM

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