![]() |
VBA unable to recognize code after reinstallation of MS Office
After reformatting my harddisk & full re-installation of Microsoft Office
2003,my VBA can no longer execute the below codes. I get error message "Compile error: Can't find project or library". Now, VBA doesn't seem to recognize "Trim" & "Format" as in below codes. What's missing from my installation? Trim(MyString) Msg = "Job done in : " & Format(endtimer - starttimer, "0.0") & " secs" Thanks in advance. -- Edmund (Using Excel 2003) |
VBA unable to recognize code after reinstallation of MS Office
I'm a newbie at this, but since you just reformatted and reinstalled, check
your References to be sure that the required libraries are referred to by your VBA/Excel. In the VB Editor, go to Tools, References, and see to it that two boxes are checked...let's see, here, I just read about this...ah, here it is. In my version (also 2003) when I hit the Help button I see this line: "NOTE: You can't remove the 'Visual Basic For Applications' and 'Visual Basic objects and procedures' references, because they are necessary for running Visual Basic." Now, this note is apparently not strictly true, for in my version I see that "Visual Basic For Applications" is checked, but "Visual Basic objects and procedures" is not. Still, it seems likely to me that your missing functions might be in one or both of those libraries, and that by checking those boxes you might restore their functionality. --- "Edmund" wrote: After reformatting my harddisk & full re-installation of Microsoft Office 2003,my VBA can no longer execute the below codes. I get error message "Compile error: Can't find project or library". Now, VBA doesn't seem to recognize "Trim" & "Format" as in below codes. What's missing from my installation? Trim(MyString) Msg = "Job done in : " & Format(endtimer - starttimer, "0.0") & " secs" |
VBA unable to recognize code after reinstallation of MS Office
Open the workbook with the problem
Go into the VBE Select that workbook's project Click on Tools|References, look for a MISSING reference. Delete it or replace it with one that you need. Missing references can cause errors that have no relationship to the line that's marked as error. Edmund wrote: After reformatting my harddisk & full re-installation of Microsoft Office 2003,my VBA can no longer execute the below codes. I get error message "Compile error: Can't find project or library". Now, VBA doesn't seem to recognize "Trim" & "Format" as in below codes. What's missing from my installation? Trim(MyString) Msg = "Job done in : " & Format(endtimer - starttimer, "0.0") & " secs" Thanks in advance. -- Edmund (Using Excel 2003) -- Dave Peterson |
VBA unable to recognize code after reinstallation of MS Office
"Dave Peterson" wrote in message ... Open the workbook with the problem Go into the VBE Select that workbook's project Click on Tools|References, look for a MISSING reference. Delete it or replace it with one that you need. Missing references can cause errors that have no relationship to the line that's marked as error. But a sure sign that a reference is missing is a compile error on a member of the Strings library, such as Trim, Format, Left, etc. Strings is the canary in the VBA coal mine. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ |
All times are GMT +1. The time now is 02:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com