Jump to content

VBA - Library not registered


Tyke

Recommended Posts

We have a VBA macro that's been very successfully used on all machines in the office on a daily basis for several years now. Suddenly yesterday on just one machine the macro will not run any more. It starts and then stops with an error message saying the library is not registered. Entering Debug Mode it stops at the line where the File Stream Object is set. The FSO is only used for writing data to an ASCII file. When checking the references in the project I can see that Microsoft Scripting Runtime (scrrun.dll) is already included.

 

When I checked out another macro that uses FSO, but this time for reading data from an ASCII file, I get exactly the same error. But once again just on that one machine. The machine is an HP Z400 running a 32-bit Windows XP operating system and with 4 GB RAM. In the recent past there has been no new software installed on the machine and it works in a network with no access to the internet.

 

Has anybody else experienced this problem or know how to fix it?

Link to comment
Share on other sites

None of the computers have had a recent IE upgrade. It's just the one computer and FSO functioned fine up to last Thursday, the computer was first used again yesterday. I don't see it as relevant but the problem has only arisen since the 1st November.

 

We have a separate network for internet access and these computers have IE updates, but none of the computers in that network have access to the CAD network.

Link to comment
Share on other sites

Just as additional info, on the problem computer installed is AutoCAD Civil 3D 2013 and 2012. The FSO problem occurs in both 2012 and 2013. So it looks like it is not an AutoCAD problem.

Link to comment
Share on other sites

  • 1 month later...

I solved the problem! :D

 

VBA reported that the library was not registered. Entering debug mode highlighted the line where the FileSystemObject was instanced. I stopped the macro and went to Tools > References and got the DLL name of the Microsoft Scripting Runtime (scrrun.dll). I then went to the Windows CMD and entered "regsvr "C:\Windows\system32\scrrun.dll"". It then reported that the DLL had been successfully registered. Now the computer is back in business and earning money ;). What exactly caused the problem is unclear, but what the hell, it's working now.

Link to comment
Share on other sites

no wonder I couldn't guess what was wrong. You deserve some gluhwein.. :D

We were on the Weihnachtsmarkt last night and I managed to sample a few Glühwein. I think it was that that got me inspired today ;)

Link to comment
Share on other sites

We were on the Weihnachtsmarkt last night and I managed to sample a few Glühwein. I think it was that that got me inspired today ;)

I Can understand that! I miss the Weinachsmakt. :(

 

My niece has just got a job initially in Germany (Berlin or Frankfurt) but I think closer family will grab the best dates.

Link to comment
Share on other sites

I Can understand that! I miss the Weinachsmakt. :(

 

My niece has just got a job initially in Germany (Berlin or Frankfurt) but I think closer family will grab the best dates.

 

My info is that Weihnachtsmärkte in Frankfurt and Berlin are good, but the best one is in Dresden followed closely by Annaberg. Dresde is certainly worth the effort to visit and it's only 90 minutes by car from Berlin.

 

http://www.weihnachtsmarkt-dresden.de/index_eng.html

 

http://www.dresden.de/en/05/08-Christmas.php

 

http://www.dresden.de/dig/en/veranstaltungen/weihnachtszeit/weihnachtsmaerkte.php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...