CurDir

C

CLR

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
 
T

Tom Ogilvy

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.
 
C

CLR

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top