Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    you "hardcode" the path (this code will work if the file is on local drive):



    Code:
    Sub Seperate_Sheets104()
    
    ' jojowhite
    Dim RootPath as string
    
    
    Dim Path1 As String
    Dim Path2 As String
    Dim Path3 As String
    Dim Path4 As String
    Dim Path5 As String
    Dim Path6 As String
    Dim Path7 As String
    
    
    Application.ScreenUpdating = False
    
    
    'jojowhite
    RootPath = Environ$("UserProfile") & "\Desktop\8500999999 - 10 Downing St London\8. Departmental\Projects SPN"
    
    
    Path1 = RootPath & "\5. Construction\Supplier and Subcontractor\" & "RFQ LOCKED_Yr1Rates" & ".xlsx"
    Path2 = RootPath & "\4. Legal\" & "P&C Request"
    Path3 = RootPath & "\5. Construction\Metering\" & "Mpan Request Form"
    Path4 = RootPath & "\5. Construction\Metering\" & "Contractor Work Instruction"
    Path5 = RootPath & "\5. Construction\H&S\" & "Hazard Form"
    Path6 = RootPath & "\5. Construction\" & "Indicative Delivery Timeline"
    Path7 = RootPath & "\5. Construction\" & "Projects Man Hours Calculator"
    ...
    ..

  2. #17
    Kev86 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2022
    Posts
    68
    Welshgasman, unfortunately they have implemented a BOT to do some of the work relating to creating the folder and they now create one folder for all, hence why they now have the departmental folder with unique documents for the different areas we cover. I think it's just starting to look easier to just manually move the spreadsheet out of the Projects SPN folder and move it back to the top of the folder each time.

  3. #18
    Kev86 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2022
    Posts
    68
    Jojowhite, the folders are on a network drive

  4. #19
    Kev86 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2022
    Posts
    68
    Jojowhite, thank you for this but i don't think that will work as the Rootpath will be ever changing as the folder name starting 85* will change based on the job number and also the folder location will move about as it works it way through the team/ business.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Export to excel and format excel using macro
    By Authomas in forum Programming
    Replies: 2
    Last Post: 11-23-2022, 07:56 PM
  2. Replies: 2
    Last Post: 09-26-2017, 09:18 AM
  3. An Access Macro and an Excel Macro
    By Lou_Reed in forum Access
    Replies: 1
    Last Post: 09-21-2017, 03:32 PM
  4. Access macro vs. excel macro
    By twckfa16 in forum Macros
    Replies: 3
    Last Post: 01-07-2015, 03:44 PM
  5. Replies: 1
    Last Post: 03-11-2014, 09:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums