#1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default CurDir

Hi All...........

I have the following code (that I don't begin to understand), which I got
here some time ago. It seems to me that it worked once, but since, my
computer has been upgraded and Office re-installed. Currently I get the
error message "Compile Error: Can't find project or library" with the term
"CurDir" highlighted, when trying to run it.........
Help please......

Function GetFileNameMulti() As Variant
Dim myCurFolder As String
myCurFolder = CurDir
GetFileNameMulti = Application.GetOpenFilename
ChDrive myCurFolder
ChDir myCurFolder
End Function

TIA for any help
Vaya con Dios,
Chuck, CABGx3


  #2   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default CurDir

I found the problem......it seems this file was from another computer on
which I had several references checked that no longer exist.......unchecking
them cleared the problem.....this code now runs fine........

Thanks anyway........

Vaya con Dios,
Chuck, CABGx3



"CLR" wrote:

Hi All...........

I have the following code (that I don't begin to understand), which I got
here some time ago. It seems to me that it worked once, but since, my
computer has been upgraded and Office re-installed. Currently I get the
error message "Compile Error: Can't find project or library" with the term
"CurDir" highlighted, when trying to run it.........
Help please......

Function GetFileNameMulti() As Variant
Dim myCurFolder As String
myCurFolder = CurDir
GetFileNameMulti = Application.GetOpenFilename
ChDrive myCurFolder
ChDir myCurFolder
End Function

TIA for any help
Vaya con Dios,
Chuck, CABGx3


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default CurDir

In the workbook where you have the error - after it occurs, go into the VBE
and look in tools references (the troublesome workbook should be the active
project - selected in the project explore) and you should find one or more
references marked as MISSING.

You should remove or correct these missing references.

--
Regards,
Tom Ogilvy


"CLR" wrote in message
...
Hi All...........

I have the following code (that I don't begin to understand), which I got
here some time ago. It seems to me that it worked once, but since, my
computer has been upgraded and Office re-installed. Currently I get the
error message "Compile Error: Can't find project or library" with the

term
"CurDir" highlighted, when trying to run it.........
Help please......

Function GetFileNameMulti() As Variant
Dim myCurFolder As String
myCurFolder = CurDir
GetFileNameMulti = Application.GetOpenFilename
ChDrive myCurFolder
ChDir myCurFolder
End Function

TIA for any help
Vaya con Dios,
Chuck, CABGx3




  #4   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default CurDir

That's exactly it Tom..........thanks!

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

In the workbook where you have the error - after it occurs, go into the VBE
and look in tools references (the troublesome workbook should be the active
project - selected in the project explore) and you should find one or more
references marked as MISSING.

You should remove or correct these missing references.

--
Regards,
Tom Ogilvy


"CLR" wrote in message
...
Hi All...........

I have the following code (that I don't begin to understand), which I got
here some time ago. It seems to me that it worked once, but since, my
computer has been upgraded and Office re-installed. Currently I get the
error message "Compile Error: Can't find project or library" with the

term
"CurDir" highlighted, when trying to run it.........
Help please......

Function GetFileNameMulti() As Variant
Dim myCurFolder As String
myCurFolder = CurDir
GetFileNameMulti = Application.GetOpenFilename
ChDrive myCurFolder
ChDir myCurFolder
End Function

TIA for any help
Vaya con Dios,
Chuck, CABGx3





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
CurDir in excel 2003 shishi Excel Programming 1 August 30th 05 08:25 PM
Curdir Jos Vens[_2_] Excel Programming 2 March 29th 05 12:53 PM
CurDir does not work Jim73 Excel Programming 3 January 12th 05 08:15 AM
CurDir vi_sh_wa Excel Programming 2 December 14th 04 08:17 AM
Excel 97 VBA - CURDIR, not reliable Ricke G Excel Programming 2 July 28th 04 07:52 PM


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

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"