PC Review


Reply
Thread Tools Rate Thread

a defined name not working in Excel 2007

 
 
=?Utf-8?B?QnVtYnJsaWs=?=
Guest
Posts: n/a
 
      26th Aug 2007
I have a third party workbook containing VBA scripts that works in Excel 2003
but not in Excel 2007. The VBA script contains this line :

directoryName = Range("directory").Value

where directory is a name that references a cell. Excel 2007 gives me "Can't
find project or library" compile error.

How do I fix this ?
Thanks.
 
Reply With Quote
 
 
 
 
Arvi Laanemets
Guest
Posts: n/a
 
      26th Aug 2007
Hi

I myself use the syntax (Excel2000) like

directoryName = [directory]

Maybe this will work


Arvi Laanemets


"Bumbrlik" <(E-Mail Removed)> wrote in message
news:64E64FED-4914-4E5E-8B6B-(E-Mail Removed)...
>I have a third party workbook containing VBA scripts that works in Excel
>2003
> but not in Excel 2007. The VBA script contains this line :
>
> directoryName = Range("directory").Value
>
> where directory is a name that references a cell. Excel 2007 gives me
> "Can't
> find project or library" compile error.
>
> How do I fix this ?
> Thanks.



 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      26th Aug 2007
Look at Tools, References in the VBE with this project active. Likely one
at least is marked 'missing'.

--
Jim
"Bumbrlik" <(E-Mail Removed)> wrote in message
news:64E64FED-4914-4E5E-8B6B-(E-Mail Removed)...
>I have a third party workbook containing VBA scripts that works in Excel
>2003
> but not in Excel 2007. The VBA script contains this line :
>
> directoryName = Range("directory").Value
>
> where directory is a name that references a cell. Excel 2007 gives me
> "Can't
> find project or library" compile error.
>
> How do I fix this ?
> Thanks.



 
Reply With Quote
 
=?Utf-8?B?T3NzaWVNYWM=?=
Guest
Posts: n/a
 
      27th Aug 2007
A couple of conditions which I am aware of that can cause an error with named
ranges.

Condition 1:
The named range was originally created on a worksheet in the interactive
mode and the macro has been copied into a new workbook and hence the named
range is not in the new workbook. To fix select the cell in the required
worksheet and then select Formulas ribbon and in the Defined Names block
select Name Manager to confirm it does not exist. If it does not exist then
select New and create it for the range it should represent. If it does exist,
then note the range it represents and delete it and recreate it just in case
you have a glitch in xl.

Condition 2
The named range is in another workbook and the other workbook is not the
active workbook.

Regards,

OssieMac




> I have a third party workbook containing VBA scripts that works in Excel 2003
> but not in Excel 2007. The VBA script contains this line :
>
> directoryName = Range("directory").Value
>
> where directory is a name that references a cell. Excel 2007 gives me "Can't
> find project or library" compile error.
>
> How do I fix this ?
> Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Names defined in Excel 2003 invalid in Excel 2007 Bob Berens Microsoft Excel Misc 3 11th Jul 2009 12:50 AM
User Defined Function is not working for me in Excel 2007 Abdi Microsoft Excel Misc 1 18th Nov 2008 10:50 PM
user-defined charts in Excel 2007 =?Utf-8?B?TGF1cmEgQmF0dGFyYmVl?= Microsoft Excel Charting 5 1st Aug 2007 05:14 AM
Why doesn't working? Application-defined or object-defined error =?Utf-8?B?U3VwcGVyRHVjaw==?= Microsoft Excel Programming 1 7th Jun 2006 03:58 PM
Menu/toolbars/macros defined in Excel 2003 not working in other versions? aiyer Microsoft Excel Programming 2 13th Aug 2004 07:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:01 PM.