Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 _______ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can Excel recognize code I didn't write? | Excel Programming | |||
Unable to open Office 2007 files using Office 2002 XP | Excel Discussion (Misc queries) | |||
Unable to access the Office Online Web site in Office 2003, Excel | Excel Discussion (Misc queries) | |||
Problem reinstallation MS Ofiice on new PC. Authorization Issue | Setting up and Configuration of Excel | |||
Reinstallation of Win xp and MS office XP pro | Setting up and Configuration of Excel |