+ Reply to Thread
Results 1 to 5 of 5

Macro that creates a new folder, File, pdf in a new location

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Macro that creates a new folder, File, pdf in a new location

    I would like a macro to create a new folder in a new Directory...as well as save multiple sheets from the same book individually.... in the same Folder.

    I do not have a macro to create a new folder in an existing path. Below are the appropriate saving info of the macros I am currently using.



    The Destination of the new folder And Range of the new name of the folder.

    Please Login or Register  to view this content.
    Here are the sheets and the code whereby i save each one individually

    This Saves sheet (6 Estimate Print)

    Please Login or Register  to view this content.
    This saves 2 sheets (Stocked Items", "Stocked Prices)

    Please Login or Register  to view this content.
    This Saves Sheet (Terrance Labor Tracker)

    Please Login or Register  to view this content.
    This saves sheet (Contract Job Tracker)

    Please Login or Register  to view this content.
    How do I get all these in one Macro and saved into a new folder, new location with a new name.

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

    Re: Macro that creates a new folder, File, pdf in a new location

    Hi TBM
    This is very similar to your previous thread. Have you abandoned that? Everything was put in a single macro in that thread.
    Did you test the code that you have provided above? Given what you said in your other thread, I cannot see the above macros working because all the values for new file names came from different sheets - yet you have not referred to those individual sheets within the naming string.
    In the code provided to you in the previous thread the correct sheet was referred to inside With.. End With each time - which is not the case here and neither have you activated the sheet - so how does VBA know in which sheet to find the values?

    Spot the wrong "/" in your naming strings and amend to "\"

    Why have you declared fName as Variant? A file name will always be a string.

    Is this essentially the same question as the other thread? If it is, why start a new thread?
    Last edited by kev_; 03-07-2018 at 05:01 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: Macro that creates a new folder, File, pdf in a new location

    I could not get the old one to work.

    I imagine that it was something I did wrong.

    So starting fresh seemed like a good way to go.

    Every code above works perfectly by itself.

    I understand that it is a little hack and chop but it still works.

    I thought showing what I am using may help others see where I want to go.
    Last edited by TBM; 03-07-2018 at 10:17 AM.

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

    Re: Macro that creates a new folder, File, pdf in a new location

    Giving up on a thread and starting another one is bad practice
    - if everyone did that a lot of threads would end up incomplete and that helps nobody.

    Let's go back to the ORIGINAL thread and get things working for you

  5. #5
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: Macro that creates a new folder, File, pdf in a new location

    Thank you for your help

+ 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] Looking for Macro to pull folder name and folder size of a specific location.
    By TheDirtyDrunk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2016, 09:19 AM
  2. [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
  3. Macro to pull file from folder location Automatically
    By Ngutierr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-06-2015, 04:35 AM
  4. Replies: 14
    Last Post: 08-09-2014, 02:14 AM
  5. [SOLVED] Macro to Copy excel file from a location to a folder on Desktop
    By harish.chinni in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2013, 02:17 AM
  6. [SOLVED] Macro to Save File to Location Folder Based on Date in Cell
    By John_Day83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2013, 05:34 PM
  7. Macro That Creates A Folder
    By samdegg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2013, 02:33 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