directory

  1. K

    file path change

    Hi all, I am trying to display the below path in a dialog box after changing the current directory in An Excel Macro. Code Sample: ChDir "G:\Inventory Management\Daily Audits\BCS" externWorkbookFilepath2 = "G:\Inventory Management\Daily Audits\BCS" MsgBox externWorkbookFilepath2 MsgBox...
  2. R

    VBA - creating new directory and copy a template

    Hi, Is there a VBA to create a new directory and copy a template into it? I know it is: MkDir NewFolder How do you copy a template into NewFolder? thanks
  3. L

    Get FileNames From Directories

    Hi, I need to extract part of multiple file names from a directory, is this possible? Let's say I have H:\Lewzerrrr\ In this directory I have multiple folders and inside these multiple files. I need to go through each folder and extract partial string from the file name...
  4. P

    macro that will list all the filenames (including their creation date, modification date, hyperlink file path) in all the folders and sub-folders of a

    Good day All, Hope all is well. I humbly ask for your assistance, and help me have a macro that will list all the filenames (including their creation date, modification date, hyperlink file path) in all the folders and sub-folders of the below directory: O:\ITSC\RSG I would greatly...
  5. B

    Renaming newest File Question

    I have a macro that will save a file directly from Outlook into a directory based on an Outlook Rule. (Currently it is saving in my Documents Folder) What I want to be able to do, is chain that into another Macro that Renames that file. The main issue I have is that I won't know the name of the...
  6. RJSIGKITS

    Automatically list all directories from a folder in a worksheet

    Hi guys. I need to create a worksheet that, when opened, lists all files in a directory, sorted alphabetically, and ideally to be able to show the date the file was created as well, along with other info pulled from the directory properties. This worksheet will need to be refreshed each time it...
  7. saltkev

    File Name

    Good Morning I hope someone can help. What I need to do using VBA is Select a file Using the windows menu tree. Then pass the directory path & file name to variable1 and just the filename to variable2. Many thanks Kev
  8. J

    VBA Kill command for a file on desktop

    Hi, I want to delete a file on the desktop but want to do it without specifying the \user\ directory. I'm using CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\Docs.pdf" How do I designate the desktop as the directory to delete Docs.pdf from? Any help would be appreciated as...
  9. B

    Preventing duplicate names from two different fields appearing in a report

    I have two fields in my report where they might sometimes contain the same name. One of the fields is called RCC/SCC. The other field is called Directory office. The report I'm running has the RCC/SCC field on top and the Directory offiice right below it in the detail area of the report...
  10. E

    Converting Excel Rows to XML or TXT Files

    Hello, I am very new to VBA, but when I get an example to run off of, I can learn that way. I've found another post on this website to be helpful, but I am running into a few issues. https://www.mrexcel.com/forum/excel-questions/593439-convert-each-row-spreadsheet-into-txt-xml-file.html Goal...
  11. M

    VBA duplicate Workbook with sheet names from list

    Hi everybody, I am working on a dashboard, I have a finished one for a specific region and know I want to replicate that workbook but have the sheet name with the region changed so for example this workbook has: Directory, Region 1, Data. I would like to copy it and have: Directory, Region 2...
  12. P

    How to combine TraversePath function to email VBA code?

    Can someone help me to combine mail merge attachment VBA code with looping folder and sub-folders code? I've tried out few options and its either shows error by sending emails without the attachments or doesn't finds attachment due to the location in sub-folders. **My mail merge code is...
  13. B

    Getting VBA to recognise a file using only part of the file name as the rest is variable?

    Hi, I’m trying to set up a VBA macro to copy a list of files to another directory. Up until now I’ve been using FileCopy and building up the directory path of the source file and telling it what output directory to use – nice and straightforward There’s now been a change to the naming...
  14. D

    Delete CSV files if empty in folder

    Hi. I have been trying for a while now to delete csv files in a directory if these are empty/blank. Basically I have a routine that updates multiple csv files in a directory and within certain csv files i will delete all the values as i dont need to use them, but some files will be left with...
  15. H

    Vba does not want to Kill the Last File in the Directory

    Hello, I have a code that when it is clicked it finds all the jpg files in a directory and places there Names in an Array then deletes one by one with Kill. Everything went fine until the last file where I get an Error 53 "File not found". I checked and the file is there. So I changed the...
  16. J

    How to change the directory when using saveas dialog

    Hi folks, I can't quite figure this out, but I think (hope) I'm close. I'm trying to force the Save As dialog box to change to the "T:\SUPERVISORS REPORTS" directory after the rest of the code is finished. I'm just not quite sure where (or if that's even the correct way to do it) to put the...
  17. T

    VBA code that will check all files in a directory, copy the contents of the first sheet, and paste it on the first sheet of the main excel file

    Hello Mr Excel team. I have this code Sub FetchName() Dim directory As String, fileName As String, sheet As Worksheet, i As Integer, j As Integer Application.ScreenUpdating = False Application.DisplayAlerts = False Workbooks.Open ("c\text.xlsb") directory = "c\test\test\" fileName =...
  18. S

    Directory Path of selected file

    Using some VBA, I am able to select a file. I need to get the directory path of that selected file without the file name. The answer seems to be right in front of me but I am missing something. Here is the code I am using: Private Sub PickFile() Dim fd As FileDialog Dim sPath As String...
  19. O

    Creating Directories from data in selected cell and then create a sub-directory, one Macro

    I am trying to create a Macro in VBA editor. What I want it to do is create a directory from the text in one cell be selected. The code below works to create the directory from a selected cell but will not create sub-directory called "High". I also think I need some error handling...
  20. W

    Formula to find allow me to get a list the folder names in a specific directory.

    Hi All, I have been working on this for awhile now and I am stuck. I have figured out a formula that will give me a list of files in a specific directory BUT I do not need the file names, I need the directory names. Does anyone have any clue how to do this? I would prefer to do it with a formula...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top