+ Reply to Thread
Results 1 to 2 of 2

Excel Macro - to move selected sheets no a new workbook and save, and save as pdf

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel Macro - to move selected sheets no a new workbook and save, and save as pdf

    Hi All,

    I am trying to do the following with my worksheet. Nee the help form community friends with the coding in excel.

    part 1 Save as - selected worksheets

    1. I am having an excel file which contains say 10 sheets (Say the name of file is "myworkbook")
    2. first sheet is named as "Index"
    3. column "A" of the index sheet contains names of certain sheets from the same file.
    4. Names are given in A1, A2, A3 and so on. This list in column is changing and not fixed, I mean column A can contain say 5 sheet names from A1 to A5 or say 7 sheet names from A1 to A7).
    5. I need to select all those sheets which are listed in column A
    6. the macro should create a folder called "export" at the same location of "myworkbook" file. (eg. if pat of "myworkbook" file is desktop, macro should create a folder called "export" on desktop. if there is already such folder it should go to the next step.
    7. then macro should create a sub-folder in the export folder. name of this folder should be based on time, i.e. name should be YYYY-MM-DD
    8. Now the selected sheeets (as referred to in sr. 4 and 5 above) should be saved in the sub-folder created at Sr. 7 above. file name should be say "newbook" prefixed with time stamp yyyy-mm-dd
    9. external links in "newbook" should be broken (i.e. break all links in "newbook")

    part 2 Save sheets as separate pdf files

    10. column "B" of the index sheet contains names of certain sheets from the same file.
    11. Names are given in B1, B2, B3 and so on. This list in column is changing and not fixed, I mean column B can contain say 5 sheet names from B1 to B5 or say 7 sheet names from B1 to B7).
    12. I need to convert each of those sheets which are listed in column B and save them separately as pdf in the same folder as referred in sr. 8 above. Name of these files to be name of the respective sheet.

    Request you to help me with coding.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Excel Macro - to move selected sheets no a new workbook and save, and save as pdf

    This deals with 1 - 8
    Create a new master workbook and place this macro in that workbook
    Amend path to MyWorkbook

    welcome to the forum

    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

+ 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. Excel doesn't change the cell format on save through the workbook save button
    By mitko1994 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-16-2017, 03:09 PM
  2. Replies: 7
    Last Post: 02-25-2017, 02:53 AM
  3. Only save selected sheets in new file?
    By jamewoong in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2013, 02:10 PM
  4. Macro to Copy Sheets and Save As New Workbook Crashing Excel
    By JamieAtJack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2012, 08:19 PM
  5. [SOLVED] Macro to save sheets as different workbooks on save
    By BridgeCat in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-09-2012, 08:10 AM
  6. Event macro to Protect all sheets on workbook save
    By zhuanyi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2008, 12:29 AM
  7. [SOLVED] Creating a macro to open as save other selected Excel sheets
    By Wessie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 04:40 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