objfile

  1. J

    How do I ignore hidden files?

    Hi, I currently have the below code to pull a list from a file path every time the worksheet is activated. Sub worksheet_Activate() Dim objFSO As Object Dim objFolder As Object Dim objFile As Object Dim i As Integer Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder =...
  2. A

    Check if Spreadsheets in a Folder are Signed

    I do not know if this is possible but basically I would like to have the spreadsheet check a folder, then return excel file names and whether the document is signed. I've tried a few things that don't seem to work. First I wrote this code to list all files within the folder: Sub Test()...
  3. V

    Search for files within a folder and it's subfolders

    Hi, I have cobbled together the following code which works. The problem I have is that I need the file search to extend to the subfolders within the selected folder. Can anyone help? Function picInsert(folder As String, articleCode As String, material As String, colour As String, row As...
  4. S

    Avoiding Error if User clicks the Cancel Button in BrowseFolder

    Hi I am using BrowseForFolder to Select Folders. The code works fine but everytime I click the "Cancel" Button an Error occurs. Here is the code: Dim objShell Dim strFileName Dim strFilePath Dim objFile Set objShell = CreateObject("Shell.Application") Set objFile = objShell.BrowseForFolder(0...
  5. L

    listbox populate

    hi I have a the following Dim objFSO As Object Dim objFolder As Object Dim objFile As Object Dim i As Integer 'Create an instance of the FileSystemObject Set objFSO = CreateObject("Scripting.FileSystemObject") 'Get the folder object Set objFolder = objFSO.GetFolder("C:\file loction\find") i...
  6. dhancy

    Excel VBA: Check Folder Permissions

    I have a VBA script that cycles through subfolders looking for a specified file. Often, there are subfolders to which I do not have access. My script ends with a "permission denied" error. Is there something I can add to my code that will check permissions on a folder before attempt to access...
  7. B

    Addition to VBA code to run through Sub Folders

    Hello, Please can some adapt the below code to allow the files to run through sub folders? Sub Example1() Dim objFSO As Object Dim objFolder As Object Dim objFile As Object Dim i As Integer Sheet2.Activate 'Create an instance of the FileSystemObject Set objFSO =...
  8. B

    VBA to check for file type

    This is the code i'm using now and its working perfect, the one thing it doesnt do it check for the file type. the only thing i want it to bring the file name in for is *.xls* i dont see where to edit the code to have that check. :/ Sub FileHyperlinks() Dim objFSO As Object Dim objFolder As...
  9. H

    Save As active PDF file with a different name

    Hi All, I've a PDF file. I'm opening it through the below code. Before closing it, I wish to rename/Saveas the file with a different name (Lets say 'ABC.PDF). Can anyone help. Dim lMyNewNum As Long Dim strTest As String Dim XLName As String, PDFPath As String, READERPath As String...
  10. L

    File List with HyperLinks to Subdirectories

    I found this code on the Internet. It creates a file list in excel with hyperlinks to files in a folder. It works perfectly. I need the code edited to create a file list of a directory and its subdirectories. I played with the path line but I couldn't figure it out. Can somebody edit this...

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