Solved: Excel 2003 - problem with vba

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 
Joined
Jul 1, 2005
Messages
8,546
Total stab in the dark: check (in the VBE) Tools > References. Anything listed as "Missing"?
 
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
 

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.
 
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
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
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
 

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.
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
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.
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
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?
 
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
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
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 ?
 

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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top