Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 257
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Excel recognize code I didn't write? danhattan Excel Programming 1 August 10th 07 11:50 PM
Unable to open Office 2007 files using Office 2002 XP GildaBB Excel Discussion (Misc queries) 2 July 20th 07 04:08 AM
Unable to access the Office Online Web site in Office 2003, Excel Marcy S Excel Discussion (Misc queries) 2 March 21st 06 09:56 PM
Problem reinstallation MS Ofiice on new PC. Authorization Issue Reinstallation User Setting up and Configuration of Excel 1 July 16th 05 04:34 AM
Reinstallation of Win xp and MS office XP pro Lethal Setting up and Configuration of Excel 11 May 3rd 05 04:17 PM


All times are GMT +1. The time now is 05:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"