ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compile error on "Right", missing Library (https://www.excelbanter.com/excel-programming/341544-compile-error-right-missing-library.html)

SIGE

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 ...


Norman Jones

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 ...




SIGE

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


Norman Jones

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




SIGE

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


Helmut Weber[_2_]

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

Norman Jones

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




Peter T

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




SIGE

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


Peter T

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





All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com