Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
lee lee is offline
external usenet poster
 
Posts: 184
Default Project-Library Error

Below is some code that I got off a website and modified to determine the
location and name of a file. It has been working fine for the last couple of
years. We recently transitioned to XP and Office 2003. Now I'm getting a
compile error - "Can't find project or library" and the word "Right" is
highlighted.

'Set path, filename, and tab name
On Error Resume Next
Set sh = ActiveSheet
spath = ActiveWorkbook.Path
If Right(spath, 1) < "\" Then spath = spath & "\"
Name = spath & ActiveWorkbook.Name
CodeName = sh.CodeName

I've declared sh as Worksheet, spath as string, Name as string, and Codename
as string.

Has something changed in Office 2003 or do I have an error elsewhere?

Thanks,
--
Lee Kirts
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Project-Library Error

If you go to the VB IDE and look in ToolsReferences you will find an item
preceded by MISSING. Uncheck that, run your code, and see if you need to
restore any libraries to the latest version.

--
HTH

Bob Phillips

"Lee" wrote in message
...
Below is some code that I got off a website and modified to determine the
location and name of a file. It has been working fine for the last couple

of
years. We recently transitioned to XP and Office 2003. Now I'm getting a
compile error - "Can't find project or library" and the word "Right" is
highlighted.

'Set path, filename, and tab name
On Error Resume Next
Set sh = ActiveSheet
spath = ActiveWorkbook.Path
If Right(spath, 1) < "\" Then spath = spath & "\"
Name = spath & ActiveWorkbook.Name
CodeName = sh.CodeName

I've declared sh as Worksheet, spath as string, Name as string, and

Codename
as string.

Has something changed in Office 2003 or do I have an error elsewhere?

Thanks,
--
Lee Kirts



  #3   Report Post  
Posted to microsoft.public.excel.programming
lee lee is offline
external usenet poster
 
Posts: 184
Default Project-Library Error

Bob,

Thank you. There was a viewer control missing. Unchecked it, recompiled,
ran it and it worked fine. Thanks again
--
Lee Kirts


"Bob Phillips" wrote:

If you go to the VB IDE and look in ToolsReferences you will find an item
preceded by MISSING. Uncheck that, run your code, and see if you need to
restore any libraries to the latest version.

--
HTH

Bob Phillips

"Lee" wrote in message
...
Below is some code that I got off a website and modified to determine the
location and name of a file. It has been working fine for the last couple

of
years. We recently transitioned to XP and Office 2003. Now I'm getting a
compile error - "Can't find project or library" and the word "Right" is
highlighted.

'Set path, filename, and tab name
On Error Resume Next
Set sh = ActiveSheet
spath = ActiveWorkbook.Path
If Right(spath, 1) < "\" Then spath = spath & "\"
Name = spath & ActiveWorkbook.Name
CodeName = sh.CodeName

I've declared sh as Worksheet, spath as string, Name as string, and

Codename
as string.

Has something changed in Office 2003 or do I have an error elsewhere?

Thanks,
--
Lee Kirts




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
Can't Find Project or Library Error Vick Excel Discussion (Misc queries) 1 May 17th 08 12:25 PM
Excell error "Can't find Project or Library" Project VBAProject Lost in Excel Excel Worksheet Functions 0 April 12th 07 04:42 PM
can't find project or library - error Chris T-M New Users to Excel 4 January 18th 07 10:23 PM
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
Compile Error! Can't find project or Library --- Help! Suh Suk Ho Excel Programming 2 July 21st 03 08:26 PM


All times are GMT +1. The time now is 09:46 AM.

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

About Us

"It's about Microsoft Excel"