1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel 2003 - problem with vba

Discussion in 'Business Applications' started by SStarker, Jan 6, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    Greetings. I have Excel 2003 and Windows Vista. I created a vba script and it has ran for many years. About 2 months ago the vba has had an error message that contains "Active X component can't create object" which occurs at the "Set fs..." statement below.
    Dim fs, f
    answr = "\300072.txt"
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.CreateTextFile(answr, True)
    ...
    I have been searching the internet all day and I just can't find an answer to my problem. It's not my script. Now I'm getting "License information for this component not found. You do not have an appropriate license to use this functionality in the design environment." There has to be some updates I received during the month of November (OS or Office 2003) that interfered with my script. Anybody out there having a similar problem and who has found a solution? Thanks in advance.

    Scott
     
  2. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Total stab in the dark: check (in the VBE) Tools > References. Anything listed as "Missing"?
     
  3. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Open the Workbook and press ALT + F11 to bring up the VB editor. Click TOOLS >> REFERENCES and make sure there is a checkmark in the box next to Microsoft Scripting Runtime.

    Regards,
    Rollin
     
  4. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    No. Nothing "Missing".
     
  5. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    "Microsoft Scripting Runtime" isn't there. Although "Microsoft Script Control 1.0" was there but I tried it and it didn't work.
     
  6. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Use the search feature in Windows to look to see if the needed DLL file exists >> scrrun.dll

    I believe the file should be located in C:\Windows or one of its subfolders.

    If the file exists you should try to re-register by opening a command prompt and then typing the following command and click OK.

    regsvr32 scrrun.dll

    If the file doesn't exist on your system you will need to download it to your Windows directory and then register it using the same command above. The download link is below.

    http://www.microsoft.com/downloads/...25-D896-482E-A0D6-524E7E844D81&displaylang=en



    Rollin
     
  7. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,597
    First Name:
    Hans
    Have you upgraded the system OS to Windows 7?
    A lot of these options are not functioning anymore under Windos 7, I have to find other code for similar scripts
     
  8. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    I didn't find scrrun.dll. I'll have to download the scrrun.dll when I get home.
     
  9. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    No. Fortunately, I have Windows Vista!
     
  10. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,597
    First Name:
    Hans
    Hi Starker,

    Just out of curiosity, could you attach you Excel file so that I can take a look at it?
    That is if it doesn't have and sensitive data, another otpion is to export the vba module that contains the routine with the problem, you'll have to zip or rar it to allow it to be attached.
     
  11. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,597
    First Name:
    Hans
    I just copied your part of the code and it works fine here.

    Exel 2003 and Windows 7
    and it works here.

    It's stange that it shouldn't work.
    Hav you made sure that all the Extensions are active in the VBA project?
     
  12. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    The problem is that he is missing the reference to Microsoft Scripting Runtime. Not sure how it go removed since it is automatically included when MS Office was installed. It will need to be downloaded and registered again before the script will work.

    Rollin
     
  13. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,597
    First Name:
    Hans
    He could unpack it from the Windows install folder (I386) and then copy it to the Windows\System32 folder
    search for the scrrun.dl_ and use expand to unpack it ?
     
  14. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    Running regsvr32 scrrun.dll after downloading the file worked! Hallelujah! I have no idea how it happened. It just stopped executing. I believe it was Windows Vista update or MS Office 2003 update that messed things up. But, thank you, Rollin! I really appreciate it.

    Scott
     
  15. SStarker

    SStarker Thread Starter

    Joined:
    Aug 31, 2010
    Messages:
    15
    Do you want me to upload it anyway consider that the problem is solved?
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/973050

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice