folder path

  1. M

    Get full filepath

    Hi Guys Can anyone please help me. I am trying to add to the macro below, but i can't seem to find the right method. I am searching a folder for picture files. My issue however is, that am only able to search for files using a "*" as i do not know the full file name, only a article number...
  2. L

    VBA Save As with User prompted to select folder path

    I have a macro that uses the GetSaveAsFilename which is fine except it makes the user type in the file name to save the file. The issue is people mistype the file name which messes up other macros down the line. The file name never changes but the folder location does so the user needs to be...
  3. H

    File names to excel from respective folders

    Hi All, I am working on some automation and need your help in vba code to get excel file names from respective folders......for example ..I have 10 different folders and need the file names those were inside the folder to excel cell starting from A1, A2, A3...so on... if I get the complete...
  4. B

    Scan MULTIPLE folders / locations.

    Hi there! I'm having some issue on coding for an "item" count from multiple folder locations. The code below works fine for looking at a single location on a network drive but, of course, now I need to look in alternate locations... In a nutshell: if a value in column D = "A" look in location...
  5. J

    Provide file path for Access import from Excel (VBA) instead of forcing user to find folder

    Hello, I am running the code below (from Terry Kraft) from within excel and it forces the user to select the location of the files to import into access (opens up a box where the user navigates to the folder and clicks OK). I was wondering if anyone sees an easy way to adjust the code so I can...
  6. J

    Running macro every files in a folder

    Sub MacroRun() Dim file Dim path As String path = "C:\Users\Desktop\TEST\" file = Dir(path & "*.xlsm") Do While file <> "" Documents.Open Filename:=path & file Call Format ActiveDocument.Save ActiveDocument.Close file = Dir() Loop End Sub This is my code for running a...
  7. L

    Copying workbook to different folder and check for duplicate folder name

    I have a code that copies workbook to a folder by cell value (A1) and month/year. It works fine but I need it to send a 2nd copy to another folder so I can have a back up. I would like to have the workbook copied to two separate folders with the same exact name (value in A1 and month/year). I...
  8. Q

    Making Folder and Subfolder Search Recursive - Finding File Name matching Cell and Getting Path

    Hello, I've been working on this for hours, and I'm ready to ask for help. I'm a relative VBA beginner, and have been teaching myself over the past month. I know exactly what steps I want this program to take, but am having trouble implementing those steps in a way that is concise, because I...
  9. E

    Excel VBA Code for searching and opening a file in dynamic folder path

    Hi Excel community, I am a beginner in excel vba and want to ask this question. I want to be able to open the file that has selected date in it. For an example, Date input = May 1, 2015 Month = May (cell 1) Date = 0501 (cell 2) Then, run macro, it will attempt to find the folder name...
  10. D

    Folder Path Selection in VBA

    Hi, I have the following code: Sub Batch_calc() Dim sFile As String Const sPath As String = "C:\Users\CAB\Desktop\Chrono\" sFile = Dir(sPath & "*.txt") Do While sFile <> "" Workbooks.OpenText FileName:=sPath & sFile _ , DataType:=xlDelimited, Tab:=True result...
  11. N

    Extract parent folder name from file path

    i have inherited an access tool that imports a file into its database, makes a series of changes, then in its final stages exports the file back into the folder it originally came from with changes. this all works fine. however, what i want it to do, is export the file, but rename it to reflect...
  12. A

    Not working whenfolder name changes - Generating Files path from folder and sub folders snb

    I use this code to get all files in a folder/subfolder, but the problem is if my folder has spaces in its name then it does not work. e.g in this code, c:\a\*.dgpx will work but c:\a a\*.dgpx will not work. Sub GeneratingFilespathfromfolderandsubfolderssnb() c00 = "c:\a\*.dgpx" sn =...
  13. H

    Given path folder names in to Excel Sheets

    Hi Team, Can any one provide me the macro code for the below requirement. I have number of folders where need to save huge number of files in it on everyday. I need a macro code/solution to extract the given path folder data in to excel sheet (only the file names in the list format). Manually...
  14. B

    Getting a folder path to tie to a variable in my script

    I have this script that will go through a folder in which the path is hardcoded into the macro and consolidate all of the .csv files into the .xls I am working with utilizing Excel 2007. Sub Consolidate() Dim fName As String, fPath As String, fPathDone As String, OldDir As String Dim LR As...
  15. J

    Returning Path of Files

    Hi, I have over 15,000 files on a file share. I am looking to try and extract the path for each individual one and paste it in a long list on a sheet with its associated folder. I'm having a hard time of where to start. the most difficult part is there are thousands of folders and different...
  16. T

    Macros pull from all files in a folder

    I can run a pull for files I've names in a folder using the following Macros: ' ELC ' Open the ELC Audit Workbook and Copy into buffer Workbooks.Open Filename:=ActiveWorkbook.Path & "\2011 - RCM - ELC Tests Plant.xls" Sheets("Testing Summary").Select Cells.Select Selection.Copy...
  17. P

    Edit Links in Protected Sheets / Link to a file "in the same folder" (without specifying the path)

    I have a protected spreadsheet that links to another spreadsheet that is in the same folder (C:\example\master.xlsx and C:\example\subordinate.xls) I want to be able to use them both in any computer (that means, in any folder). For instance, I would like to be able to paste those two files in...
  18. E

    get information from different files for master sheet

    Hello, - I have the following folder/file structure: MP1 CT CTfile1.csv CTfile2.csv CV CVfile1.csv CVfile2.csv FT FTfile1.csv FTfile2.csv ...etc - it keeps on going for more subfolders. - Every subfolder has 2 different .csv files. - Every file has the same structure. Relevant...
  19. S

    Referencing Partial Folder Path

    If starting on a cell such as D7, how do I reference a PARTIAL folder path listed in cell F7? The path will vary in how many subfolders it has. I simply want to reference the path MINUS the last subfolder. (e.g. \\foldler1\folder2\FolderIDon'tWantToReference, but remember the names of the...

Some videos you may like

This Week's Hot Topics

Top