Tyke Posted November 6, 2013 Share Posted November 6, 2013 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? Quote Link to comment Share on other sites More sharing options...
SEANT Posted November 6, 2013 Share Posted November 6, 2013 I seem to recall that FSO would be modified with an Internet Explorer update. Is that computer running a different IE version than the rest? Quote Link to comment Share on other sites More sharing options...
SEANT Posted November 6, 2013 Share Posted November 6, 2013 After reading a bit closer I see that is probably not the problem. Though, have the other computers had a recent IE upgrade? Quote Link to comment Share on other sites More sharing options...
Tyke Posted November 6, 2013 Author Share Posted November 6, 2013 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. Quote Link to comment Share on other sites More sharing options...
Tyke Posted November 6, 2013 Author Share Posted November 6, 2013 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. Quote Link to comment Share on other sites More sharing options...
Tyke Posted December 17, 2013 Author Share Posted December 17, 2013 I solved the problem! 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. Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 17, 2013 Share Posted December 17, 2013 Good sleuthing. Quote Link to comment Share on other sites More sharing options...
dbroada Posted December 17, 2013 Share Posted December 17, 2013 no wonder I couldn't guess what was wrong. You deserve some gluhwein.. Quote Link to comment Share on other sites More sharing options...
Tyke Posted December 17, 2013 Author Share Posted December 17, 2013 no wonder I couldn't guess what was wrong. You deserve some gluhwein.. 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 Quote Link to comment Share on other sites More sharing options...
Tyke Posted December 17, 2013 Author Share Posted December 17, 2013 Good sleuthing. Thanks Sean. Quote Link to comment Share on other sites More sharing options...
dbroada Posted December 17, 2013 Share Posted December 17, 2013 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. Quote Link to comment Share on other sites More sharing options...
Tyke Posted December 17, 2013 Author Share Posted December 17, 2013 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 Quote Link to comment Share on other sites More sharing options...
dbroada Posted December 17, 2013 Share Posted December 17, 2013 we went to Berlin a few years ago and managed 9 markets in 3 days! maybe Dresden another time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.