subfolder

  1. B

    Search Folder and Sub Folders and display Information

    I found this great article (http://www.xl-central.com/list-the-files-in-a-folder-and-subfolders.html) and it is exactly what I needed. I’ve tweaked it to reflect my circumstances, my issue is, I’m trying to pull certain cell Information rather than all the information about the file itself...
  2. H

    Excel VBA GetFolder from 2 Drive (2 location)

    I had a code which work very well for 1 location (path) Possible to open and run 2 location? Sub GetFolder() Range("A:L").ClearContents Range("A1").Value = "Name" Range("B1").Value = "ParentFolder" Range("A1").Select Dim strPath As String strPath = "K:\VIEWING" 'strPath(0) =...
  3. G

    Move Mails

    Hi Everyone, Below i have a code to move all the mails to sub-folder but i am facing an error in highlighted line could any one suggest me why i am facing this error???? Option Explicit Public Sub Move_Items() Dim Inbox As Outlook.MAPIFolder Dim SubFolder As Outlook.MAPIFolder...
  4. aaaaa34

    VBA to create folder, subfolder and save workbook

    Hello my friends, I have a file mainlist.xlsx in my folder C:\Database Inside this mainlist.xlsx file, there is list of cars. in A column car brandname, B column: model name, C column model year, D column motor volume and E column price In this manner, I want to have VBA to create folder with a...
  5. N

    Count the total lines in all files in all subfolders

    i want to use vba to count all the lines in all the files in all the subfolder of a directory and display them in a cell. how do i do that? i found a code working for counting the lines in a single file. but i dont know how to construct the loop to apply this to all the files in all the...
  6. B

    Count Emails in Outlook and export to excel

    I am trying to count the amount of emails, in real time, in a subfolder in Outlook 2013 and automatically export the data to excel. I don't mind opening the excel document and refreshing the data daily, if needed. The subfolder is called "disks" - it is in a group mailbox subfolder. Any ideas?
  7. K

    Search and retrive

    Hello, I have a problem in that I have found a template with code that searches folders and sub folders for selected file types and returns the file path, date last modified etc. then in the last column it generates a link to the file, this is great for me but not for my collegues, the problem...
  8. N

    VBA - Loop through all folders and move all subfolders in each folder to a subfolder 2018

    Hi, I have large number of folders inside which I have subfolders (child folders) that I would like to move them to a new subfolder 2018 (macro should create it). In summary I need to archive all these subfolder inside each folder to a folder of last year 2018. Thanks for your help :)
  9. S

    Opening PDF from VBA

    I am trying to use the following code to open a pdf file from a folder, but I keep getting the "File not found" error. Shell "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Adobe Acrobat DC.exe " & FullPath & """, vbMinimizedFocus" Is there something I am missing? Below if the whole...
  10. sharky12345

    Get filename without extension

    I'm using this to loop through a folder and list all found files; Sub GetFolder() Range("A:L").ClearContents Range("A1").Value = "Name" Range("B1").Value = "ParentFolder" Range("C1").Value = "Size (KB)" Range("D1").Value = "DateLastModified" Range("E1").Value = "DateCreated"...
  11. B

    Iterating through folders and files with paths > 260 characters

    Hi All, As per the title, I am having an issue with iterating through folders and files where the path exceeds the charater limits. Below is my code: Sub test() Dim FileSystem As Object Dim HostFolder As String HostFolder = Sheet1.Range("F16").Value If HostFolder = "" Then MsgBox "No...
  12. K

    VBA Move files to subfolders based on filename

    Hi everyone, I am new to this forum even though I have been using it for years. My turn to ask for your help as I couldn't find a solution to my problem so far. Here is my issue: I have several files with a given name in a same folder, let's say drive D: Ex: D:\AAAA.xls D:\BBBB.xls D:\CCCC.xls...
  13. R

    VBA question - new doc in subfolder

    Hi, Do you know how to create a new word doc under the subfolder in NewR folder? This is what I have so far. I was able to create a subfolder under NewR folder, but is currently trying to create a word doc in the subfolder. Any help will be appreciated. thanks Option Explicit Private Sub...
  14. F

    List folders in directory, with criteria

    Apologies if this is a considered a duplicate post. This macro lists first and second level sub-folders after the selected folder "folderspec", with the condition that any of the subfolders' name contains the string "OK" (sub-folder with this string can be at any level). The output is divided...
  15. F

    List folders in directory, if any sub-folder contains string

    With this macro, sub-folders are listed for first and second levels (based on selected folder). The output is divided into separate columns in this example. I now want it to list folders only if any of the sub-folders contain the string "OK". The sub-folder with this string can be at any level...
  16. V

    How to transfer file in a subfolder into another subfolder inside it

    hello experts! I need your expert advise. I have a folder named Reports and inside this folder, it has multiple subfolders. I am currently doing a macro and my goal is to transfer a specific excel file (with filename "Gross Contribution Report") found inside a subfolder (example Japan) into...
  17. V

    Ignore "Closed" Folders

    Hello All I am hoping someone can help on this please One of our members kindly gave me this code which works great The only issue is I want to ignore any folders that have "Closed" as the name in any folder but I don't know how to change the code [Public Sub ScanSubfolders() Dim FileSystem...
  18. Y

    How to Find and open an outlook email from its subject and get the date of reception to a cell

    Good afternnon Mr Excel's forum, I am trying to #1 Open the last email received containing a specific reference in the subject #2 Save it in a specific folder in windows (let's say my documents) #3 Store it in a subfolder in outlook( which is a shared mailbox, different from the defaultforlder...
  19. J

    Vba- file

    I am trying to list all the files within a specific directory and it's subdirectories. The following code is working for that. However, I want to only get .png & .pdf files listed. I also want to skip specific folders, either that contains a word or is listed in specific cells. Sub...
  20. L

    "Mismatch" on a VBA string help

    Hi guys I have the below code, but I am getting a mismatch error on line 11. Any ideas? I'm a newbie to all this so it's got me stumped! Sub GetLatestFiles() Dim strDir As String, fs As Object, startFolder As String, subfolder As Object, increment As Integer, latest As Integer, latestFolder...

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top