+ Reply to Thread
Results 1 to 9 of 9

Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create Obj

  1. #1
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create Obj

    Here is the code. It works on Window 7 Professional, 64-bit, Office 2016. It does not work on Windows 7 Professional, 32-bit, Office 2013. I get the active X error message

    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    The Scripting library isn't dependent on Office version and should work with either bitness of Windows. Are you sure it hasn't been blocked by policy on one of the machines? Can you set a reference to the Scripting runtime and early bind the code on the problem machine just to test?
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    Try re-registering the dll required.

    In an admin command prompt:

    regsvr32 c:\windows\system32\scrrun.dll

    Edit: may need to use the /u flag first to unregister it.

    regsvr32 /u c:\windows\system32\scrrun.dll
    Last edited by Arkadi; 03-11-2019 at 09:24 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    Arkadi: I re-registered the component and it was successful. I even rebooted the machine to be sure. The problem still persists. At home, I have instructions on how to de-register and re-register a DLL. It solved a rather knotty problem on my home machine. I will try that.

    Rory: It has been a while since I've played with early and late binding and even then I barely "scraped through." Could you give me a hand with this and show me what I would have to do with the code? Thanks.

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    Set a reference to the Microsoft scripting runtime, then amend the code to:

    Please Login or Register  to view this content.
    though, as noted before, you don't actually need to use it here.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    Aha! I get a compile error on this line:
    Please Login or Register  to view this content.
    "User-defined type not defined."

    And this is on the "good" system!

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    As rorya said, you need to go to Tools->References and check the box next to Microsoft Scripting Runtime if you want to try early binding.

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    @dflak
    It does not work on Windows 7 Professional, 32-bit, Office 2013.
    Is this the same station that you had issue with Task Scheduler?

    I'd consider repairing/reinstall of Windows 7 environment. It seems to have bunch of issues.
    Also, check hard-drive. You mentioned that you found bunch of bad sectors.
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  9. #9
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,079

    Re: Set fso = CreateObject("Scripting.FileSystemObject") - Active X component can't create

    Do you even need
    Please Login or Register  to view this content.
    It doesn't seem that fso or oFile are used at all?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Can you help with fso = CreateObject("Scripting.FileSystemObject" MAC Machine?
    By Flora20 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2019, 11:11 AM
  2. [SOLVED] problem converting to CreateObject("Scripting.Dictionary") method
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-24-2015, 04:19 AM
  3. Mac excel error Runtime Error 429 due to CreateObject("Scripting.Dictionary")
    By iamstevetay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2015, 04:21 PM
  4. What is With CreateObject("Scripting.Dictionary")
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2015, 01:50 PM
  5. Replies: 5
    Last Post: 09-10-2014, 02:12 PM
  6. [SOLVED] CreateObject("scripting.dictionary") Add Item Problem---->Empty Cells
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2014, 05:04 PM
  7. [SOLVED] How to understand and use CreateObject("Scripting.Dictionary")
    By Darthzo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-03-2013, 07:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1