From: nb0512 on
I am running a 2003 macro in Excel 2007. It fails and says 'Can't find object
or library' and highlights the word Left in Left(somestring, somenumber).
In Help I see that Left does not exist in 2007, but it does in Access. So I
include a reference the Access library (Tools/References, etc.). This does
not help.

Any suggestions anyone ? Thanks !
From: mcescher on
On Apr 8, 11:03 am, nb0512 <nb0...(a)discussions.microsoft.com> wrote:
> I am running a 2003 macro in Excel 2007. It fails and says 'Can't find object
> or library' and highlights the word Left in Left(somestring, somenumber).
> In Help I see that Left does not exist in 2007, but it does in Access. So I
> include a reference the Access library (Tools/References, etc.). This does
> not help.
>
> Any suggestions anyone ? Thanks !  

Check your references to see if any of them are missing. My guess is
that because of the different versions, you're pointing to an old
library and the filename/path have changed. Uncheck the "MISSING"
reference and find the correct one in the list.

Chris M.
From: fisch4bill on
"Left" works just fine for me in Excel 2007. Both as a formula entry in the
sheet and in the Immediate window of the VBE. Check your other library
references. Being an Excel 2003 macro the Excel and Office Object libraries
might be 11.0 whereas 2007 is 12.0.
HTH
Bill

"nb0512" wrote:

> I am running a 2003 macro in Excel 2007. It fails and says 'Can't find object
> or library' and highlights the word Left in Left(somestring, somenumber).
> In Help I see that Left does not exist in 2007, but it does in Access. So I
> include a reference the Access library (Tools/References, etc.). This does
> not help.
>
> Any suggestions anyone ? Thanks !
From: Chip Pearson on
If you have a missing reference, functions in other, available,
libraries are often "not found". In VBA, go to the Tools menu, choose
References and see if any are marked "MISSING". If so, you can uncheck
that item if you don't need it. If you do need it, you can re-install
the software that "owns" the library, contact the vendor for an
update, or change your code so that you don't need it. If it appears
to be a Microsoft library, try starting Excel with the /regserver
switch. Close Excel, then go to the Windows Start menu, choose Run,
and enter the following:

"C:\Program Files\Microsoft Office\Office12\Excel.exe" /regserver

Note that you need the quotes and that there is a space before
/regserver. Of course, your actual path to Excel.exe may be different.
The /regserver switch causes Excel to write all of its registry keys
and values back to "factory defaults". It can cure any number of ills.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com



On Thu, 8 Apr 2010 09:03:02 -0700, nb0512
<nb0512(a)discussions.microsoft.com> wrote:

>I am running a 2003 macro in Excel 2007. It fails and says 'Can't find object
>or library' and highlights the word Left in Left(somestring, somenumber).
>In Help I see that Left does not exist in 2007, but it does in Access. So I
>include a reference the Access library (Tools/References, etc.). This does
>not help.
>
>Any suggestions anyone ? Thanks !
From: nb0512 on
Thanks Chip and mcescher; I found a few MISSING references and unticked them.
It works now ! There is one other issue with annoying message boxes
regarding duplicate named ranges, but I'll write a new post re this.

BR

Niko Bel

"Chip Pearson" wrote:

> If you have a missing reference, functions in other, available,
> libraries are often "not found". In VBA, go to the Tools menu, choose
> References and see if any are marked "MISSING". If so, you can uncheck
> that item if you don't need it. If you do need it, you can re-install
> the software that "owns" the library, contact the vendor for an
> update, or change your code so that you don't need it. If it appears
> to be a Microsoft library, try starting Excel with the /regserver
> switch. Close Excel, then go to the Windows Start menu, choose Run,
> and enter the following:
>
> "C:\Program Files\Microsoft Office\Office12\Excel.exe" /regserver
>
> Note that you need the quotes and that there is a space before
> /regserver. Of course, your actual path to Excel.exe may be different.
> The /regserver switch causes Excel to write all of its registry keys
> and values back to "factory defaults". It can cure any number of ills.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional,
> Excel, 1998 - 2010
> Pearson Software Consulting, LLC
> www.cpearson.com
>
>
>
> On Thu, 8 Apr 2010 09:03:02 -0700, nb0512
> <nb0512(a)discussions.microsoft.com> wrote:
>
> >I am running a 2003 macro in Excel 2007. It fails and says 'Can't find object
> >or library' and highlights the word Left in Left(somestring, somenumber).
> >In Help I see that Left does not exist in 2007, but it does in Access. So I
> >include a reference the Access library (Tools/References, etc.). This does
> >not help.
> >
> >Any suggestions anyone ? Thanks !
> .
>
 | 
Pages: 1
Prev: runtime error 91
Next: VLOOKUP with VB