fso

  1. K

    Not understanding syntax of fso

    Hello, I'm trying to refer to a textfile and set that as an array, but i'm met with an error when trying to refer to ThisWorkbook.Path (Bad file name or number) And I don't understand how to fix it. I'm using the same type of argument to open/refer to a Workbook, and this works just fine. I'm...
  2. A

    Moving bulk files in VBA with FSO

    Hi all, I have a code that moves a batch of files from one folder to another. my issue is when I try to change one of the locations to a cell reference, I end up with run time error 5. Any help with what is likely a simple oversight would be greatly appreciated! Sub Move_Aires() Dim FSO As...
  3. wsnyder

    Get PDF Page Count

    Hi all, Trying to get page count for all pdf files. My current code at the bottom. Error here : Error message: I set references to all of these libraries I see available that appear to be Adobe related libraries: Acrobat Access 3.0 Type Library Adobe Acrobat Browser Control Type Library 1.0...
  4. P

    Help with VBA Code NOT writing to Text File correctly

    Hi there, The code below is 90% working. The issue I am having is that the code move the 8 test files into the specified folder as expected. But does not write the file detail to the audit file as expected. It appears that the code is overwriting line 1 and not append the data I have tried &...
  5. P

    VBA Run time Error "424

    I am having a problem with the VBA code below it works fine with Fileout.Write "This is a test" but files when Fileout.Write Cl.Value, Fldr & "" Also it seems to be overwriting the same line so I think a new line command somewhere. Also os it posible to get the code to append to the list...
  6. N

    Change sheetname, file name and range by cell value

    Public Sub DATA_noibang()Dim cn As Object, rs As Object, i As Byte, lr As Long, fso As Object Set cn = CreateObject("adodb.connection") Set fso = CreateObject("Scripting.FileSystemObject") Sheets("noibang").AutoFilterMode = False...
  7. M

    vba Read Text file and update in Different Column...

    Hi Team I have textfile with data in it as shown below , my task is to seperate below data in ColumnsSeperation Criteria is *---------So in Below situation Data should get populated in Column A,B,C.Thanks in advance. xxxxxxxx*--------------yyyyyyyy*--------------zzzzzzzz My attempted Code. with...
  8. A

    Filename with double quotes in the name

    I am checking for file size on files before I process them. I am trying to get information on a text file which has double quotes as part of it's name. The path and filename is saved in a table. I get an error msg(error 53: file not found....) and I can't figure out how to get around it. Here...
  9. R

    Left align the table in Mail using VBA

    Hi Team, I am stuck in one scenario where I want to left align the table in Mail. I did this kind of automation in past and this align perefectly but don’t know what I am doing wrong on below code or can anyone have any other solution. Function RangetoHTML(rng As Range) ' By Ron de Bruin...
  10. W

    Check if file exists. Keeps skipping the existing file.

    Hi. So, i got a code for checking if a file exists from google. The problem is with it, even tho the file actually exists, it keep skipping it, as it didn't exists. Code: Sub CFF() Dim fso: Set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists("Desktop\SkjKa.xlsm") Then...
  11. T

    File System Object late binding

    This code works in early binding: Dim fso As Scripting.FileSysemObject Set fso = New Scripting.FileSystemObject Dim MyFolder As Folder Set MyFolder = fso.GetFolder("C:\MyData") Dim Num As Integer Num = MyFolder.Files.Count To change to late binding, how do I declare MyFolder? For...
  12. P

    Excel 2016 issue saving to HTML format

    With Excel 2010 I had no problem populating and saving a Word template of a metric comprised of various charts, shapes, tables etc. to a .png file. This facility's monitors require image files and they were essentially a screen shot of the document. But when I upgraded to Office 2016 this week...
  13. B

    vba code-copy files from folder and sub folders

    hi everyone, I now its a mainstream thing that I am writing now in fso systems but I am trying to learn "how I would do that" thing, can you please help with the below code? It does not give any error message or something but it is not copying any materials to destination. Sub...
  14. S

    VBA CreateObject() not working in 2016 x64

    I'm using the GetBoiler function by Ron de Bruin to grab an Outlook signature for an email VBA function. This function has historically worked perfectly in 2013 x64, however I have recently been upgraded by my organization to 2016 x64, and the CreateObject() command now throws error 429 ActiveX...
  15. Z

    Any tips on how to modify this VBA to select all sheets in a workbook?

    This is some VBA from another thread here that would be very helpful to me if it were able to select all sheets in a workbook. I didnt want to hijack the other thread with this question so I posted a new thread. Any help would be appreciated. Private Sub test() Dim fso As Object, FolDir As...
  16. M

    Check if a folder exists but with a variable name?

    Afternoon all, Im trying to create a code that will automatically check for the correct monthly folder and if it doesnt exist it would create it. As it will change every month I would like to use a variable method but I keep getting an error. Sub FindFolder() Dim fso As Object Const...
  17. E

    Need to copy Worksheets from a file choosen in a ListBox

    Hi, I need to get further with this assignment. With this code I've found a given data file in my ListBox with search in the folder of my main workbook location: Public Sub UserForm_Activate() Dim fso As FileSystemObject Dim dir As Folder Dim file As file Set fso = New...
  18. D

    Using FSO

    Hi, I am using FSO in the following way to read the content of 2 files into 2 string variables. Is this correct or can I create a FSO just once and read both files into separate variables in the same code block? Also when writing data to a file is complete the file is normally closed. Can I...
  19. 3

    Run-time Error 424

    Hi, I have the following code but I got the error message saying that "Run-Time Error 424, Object Required". Wonder if someone could point out what the cause is, and how to rectify? Sub callCFP() pathName = "C:\Code\subFolder_1" Set fso = CreateObject("Scripting.FileSystemObject")...
  20. R

    Object required error

    Dim fso As Object Dim dir As Object Dim file As Object Dim rangews As Worksheet Dim fPath As String fPath = "censored" Set rangews = ThisWorkbook.Worksheets("Sheet1") Set fso = CreateObject("Scripting.FileSystemObject") Set dir = fso.GetExtensionName(fPath) line set dir =.... gives me...

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