Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Compile error on "Right", missing Library

Hi There,


I am running a piece of code but I bug on: "Right"

ExportFormat = UCase(Right(FileSaveName, 3))

Compile Error: Cant find Project or Library


Which reference should I need to set???

Sige

PS I am working in XL97 ...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Compile error on "Right", missing Library

Hi Sige,

In the VBE, with the problematic workbook's project selected, go to:

Tools | References

and look for any entries marked 'Missing'.

Uncheck these if they are not needed or use the browse button to locate the
reference.

---
Regards,
Norman



"Sige" wrote in message
ups.com...
Hi There,


I am running a piece of code but I bug on: "Right"

ExportFormat = UCase(Right(FileSaveName, 3))

Compile Error: Cant find Project or Library


Which reference should I need to set???

Sige

PS I am working in XL97 ...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Compile error on "Right", missing Library

Hi Norman,

Wished I could ... but I cannot uncheck it as it is in use ....
I can browse yes ...but to which reference?

Sige

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Compile error on "Right", missing Library

Hi Sige,

Windows | Start | Search.

What is the missing reference?

---
Regards,
Norman



"Sige" wrote in message
oups.com...
Hi Norman,

Wished I could ... but I cannot uncheck it as it is in use ....
I can browse yes ...but to which reference?

Sige



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Compile error on "Right", missing Library

Missing Location:
C:\Sige\Excel\Test
Language: Standard

I did not set any reference ... ?!

Is "Right" not a standdard VBA-function?
(or part of ATPVBAEN.xla? which is checked!)

Sige



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default Compile error on "Right", missing Library

Hi Sige,

it seems, if a reference is missing
or something else is wrong with a library,
the compiler simply stops at the first keyword
it comes across. Is has nothing to do with right.

Helmut Weber
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Compile error on "Right", missing Library

Hi Sige,

Has the missing reference file been moved or renamed? If so, browse to the
new location / name and reset the reference.


---
Regards,
Norman



"Sige" wrote in message
oups.com...
Missing Location:
C:\Sige\Excel\Test
Language: Standard

I did not set any reference ... ?!

Is "Right" not a standdard VBA-function?
(or part of ATPVBAEN.xla? which is checked!)

Sige



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Compile error on "Right", missing Library

Just to add, vba string & datetime functions are particularly prone to not
working with missing ref's. You can temporarily fix by fully qualifying, eg

s = VBA.Strings.Right(myString,1)

One reason for a missing ref might be if a project was written & compiled in
a later version of Excel than it is currently being used in.

Regards,
Peter T

"Helmut Weber" wrote in message
...
Hi Sige,

it seems, if a reference is missing
or something else is wrong with a library,
the compiler simply stops at the first keyword
it comes across. Is has nothing to do with right.

Helmut Weber



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Compile error on "Right", missing Library

Hi Guys,

I was playing on this workbook yesterday at home in XL2003... while now
(at work) I use XL97. Maybe that has something to do with it.
Nevertheless I have not set any particular reference for this workbook.

The magic "trick": I asked for a complete reset of my Excel at work.
AND now it works!!!!

The references for thhis workbook a
-Visual Basic for Applications
-Microsoft Excel 8.0 Object Library
-OLE automation
-Microsoft Forms 2.0 object Library
-Microsoft Office 8.0 Object Library
-Ref Edit Control === this is bizar I think ...

Any of them referring to the previous MISSING-ref which was indicated
to be in "C:\Sige\Excel\Test"

The "problem" is solved ...but the WHY ...still bothers me.

Sige

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Compile error on "Right", missing Library

The "problem" is solved ...but the WHY ...still bothers me.

See the second part of my earlier post which, it now appears, correctly
guessed the route of your problem.

Regards,
Peter T

"Sige" wrote in message
ups.com...
Hi Guys,

I was playing on this workbook yesterday at home in XL2003... while now
(at work) I use XL97. Maybe that has something to do with it.
Nevertheless I have not set any particular reference for this workbook.

The magic "trick": I asked for a complete reset of my Excel at work.
AND now it works!!!!

The references for thhis workbook a
-Visual Basic for Applications
-Microsoft Excel 8.0 Object Library
-OLE automation
-Microsoft Forms 2.0 object Library
-Microsoft Office 8.0 Object Library
-Ref Edit Control === this is bizar I think ...

Any of them referring to the previous MISSING-ref which was indicated
to be in "C:\Sige\Excel\Test"

The "problem" is solved ...but the WHY ...still bothers me.

Sige



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
indirect.ext - "can't find project or library" error DDawson Excel Worksheet Functions 0 December 5th 06 09:52 PM
"Compile Error Can't find project or library." mike allen[_2_] Excel Programming 3 August 10th 05 04:39 PM
Trapping the "Can't find project or library error" Ajtb Excel Programming 1 January 22nd 05 11:16 PM
Trim: Excel 97 gives error "Can't find project or library" Jim Mooney Excel Programming 10 August 30th 04 08:22 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 04:07 AM.

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

About Us

"It's about Microsoft Excel"