Automation Error The Specified Module Could Not Be Found. Filesystemobject
Post your question and get tips & solutions from a community of 418,436 IT Pros & Developers. It's quick & easy. MS Access VBA "Automation Error" 100+ P: 119 billelev I have the following vba code that returns the "date modified" field from a file, specified in filepath: Expand|Select|Wrap|Line Numbers FunctionGetFileModifiedDate(filepathAsString)AsDate Dimfs,f Setfs=CreateObject("Scripting.FileSystemObject") Setf=fs.GetFile(filepath) GetFileModifiedDate=f.datelastmodified EndFunction On one machine it runs without any problems, but on another I encounter the following error message: Expand|Select|Wrap|Line Numbers Run-timeerror(8007007e) Automationerror Thespecifiedmodulecouldnotbefound. Does anyone know how to fix this? Thanks, May 19 '08 #1 Post Reply Share this Question 9 Replies Expert 5K+ P: 8,394 ADezii I have the following vba code that returns the "date modified" field from a file, specified in filepath: Expand|Select|Wrap|Line Numbers FunctionGetFileModifiedDate(filepathAsString)AsDate Dimfs,f Setfs=CreateObject("Scripting.FileSystemObject") Setf=fs.GetFile(filepath) GetFileModifiedDate=f.datelastmodified EndFunction On one machine it runs without any problems, but on another I encounter the following error message: Expand|Select|Wrap|Line Numbers Run-timeerror(8007007e) Automationerror Thespecifiedmodulecouldnotbefound. Does anyone know how to fix this? Thanks, Set a Reference to the Microsoft Scripting Runtime Library. Rename your Function to: Expand|Select|Wrap|Line Numbers GetFileModifiedDate_2 Modify the Function code to: Expand|Select|Wrap|Line Numbers FunctionGetFileModifiedDate_2(filepathAsString)AsDate DimfsAsFileSystemObject DimfAsFile Setfs=CreateObject("Scripting.FileSystemObject") Setf=fs.GetFile(filepath) GetFileModifiedDate_2=f.DateLastModified EndFunction Let me know how you make out. May 20 '08 #2 reply 100+ P: 119 billelev Thanks for your reply. I tried what you suggested but with no success. Given that the original code worked on one machine, but not the other. Would this not imply that the issue is with the machine, rather than the code? May 20 '08 #3 reply Expert 5K+ P: 8,394 ADezii Thanks for your reply. I tried what you suggested but with no success. Given that the original code worked on one machine, but not the other. Would this not imply that the issue is with the machine, rather than the code? Given that the original code worked on one machine, but not the other. Would this not imply that the issue is with the machine, rather than the code? It would appear that way. I was almost sure that 1 of the three suggestions would have solved the problem, but obviously not (LOL). I'll put my
Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > VB Automation error 8007007e Want to Advertise Here? Solved VB Automation error 8007007e Posted on https://bytes.com/topic/access/answers/796551-ms-access-vba-automation-error 2004-04-28 Visual Basic Classic 1 Verified Solution 9 Comments 7,463 Views Last Modified: 2012-05-04 Hi! I have a problem with automation when trying to use a FileSystemObject. I run Windows XP with Office 2000 and the project is developed in Visual Basic 6. When trying to execute the code below, I get this eror: Run-time error https://www.experts-exchange.com/questions/20970348/VB-Automation-error-8007007e.html '-2147024770 (8007007e)': Automation error The specified module could not be found. ---------------------------------- Private UserFileName As String Private fso As New FileSystemObject UserFileName = fso.GetSpecialFolder(WindowsFolder) + "\users.mdb" ---------------------------------- When I look at the FileSystemObject (fso) the Watch displays this message:
Community Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rate Thread Display Modes 12-08-2005, http://www.access-programmers.co.uk/forums/showthread.php?t=98507 02:38 AM #1 KeithWilliams Registered User Join Date: Feb 2004 Location: Exeter, https://support.microsoft.com/en-us/kb/963996 UK Posts: 137 Thanks: 0 Thanked 0 Times in 0 Posts Problem referencing FileSystemObject Hi, I have the following function on a form: Code: Private Function GetCitrixClientHardDrive() Dim objFileSystem As Object, objDrive As Object, objDriveCollection As Object Set objFileSystem = CreateObject("Scripting.FileSystemObject") Set objDriveCollection = objFileSystem.Drives For Each objDrive In objDriveCollection If InStr(objDrive.ShareName, "C$") > 0 And InStr(objDrive.ShareName, automation error "Client") > 0 Then GetCitrixClientHardDrive = objDrive.DriveLetter Exit Function End If Next GetCitrixClientHardDrive = "" End Function This is failing on the first line, CreateObject("Scripting.FileSystemObject"), with the error: Quote: Run-time error '-2147024770 (8007007e)': Automation error The specified module could not be found. This application ran fine on a new PC with Office 2003 installed. However, it fails with the above error when run via Citrix on a Citrix Server with Office automation error the 2003 again newly installed. I have checked it on the Citrix server in debug mode, and there are no missing references in Tools>References. I have even added the Microsoft Scripting Library (scrrun.dll) as a reference, although it was not needed on my machine, but this made no difference. I would greatly appreciate any suggestions on what to try next! Thanks, Keith. KeithWilliams View Public Profile Find More Posts by KeithWilliams 12-08-2005, 05:58 AM #2 FoFa Newly Registered User Join Date: Jan 2003 Location: Texas, USA Posts: 3,672 Thanks: 0 Thanked 4 Times in 4 Posts Just a quick "thought off the top of me head", do you have permissions to see those objects on the Citrix Server? __________________ E Pluribus Unum - Out of Many, One FoFa View Public Profile Find More Posts by FoFa 12-08-2005, 06:38 AM #3 KeithWilliams Registered User Join Date: Feb 2004 Location: Exeter, UK Posts: 137 Thanks: 0 Thanked 0 Times in 0 Posts Hi, I'm not aware of any permissions issues. If I didn't have access to see and run the DLLs, I think the whole application would fail. Keith. KeithWilliams View Public Profile Find More Posts by KeithWilliams
One games Xbox 360 games PC games Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft