Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default a defined name not working in Excel 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default a defined name not working in Excel 2007

Hi

I myself use the syntax (Excel2000) like

directoryName = [directory]

Maybe this will work


Arvi Laanemets


"Bumbrlik" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default a defined name not working in Excel 2007

Look at Tools, References in the VBE with this project active. Likely one
at least is marked 'missing'.

--
Jim
"Bumbrlik" wrote in message
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default a defined name not working in Excel 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
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
User Defined Function is not working for me in Excel 2007 Abdi Excel Discussion (Misc queries) 1 November 18th 08 10:50 PM
user-defined charts in Excel 2007 Laura Battarbee Charts and Charting in Excel 5 August 1st 07 05:14 AM
Excel 2007 slow saving with defined names RI Excel Programming 0 June 29th 07 07:34 PM
Why doesn't working? Application-defined or object-defined error SupperDuck Excel Programming 1 June 7th 06 03:58 PM
Menu/toolbars/macros defined in Excel 2003 not working in other versions? aiyer[_34_] Excel Programming 2 August 13th 04 07:32 PM


All times are GMT +1. The time now is 10:34 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"