problems with "CurDir"

C

cubbybear3

I have the following code from Excel 2003 and can not seem
to get it to work in Excel 2007.
I get the error "Can't find project or library" on "CurDir".
Any clues as to what I am doing wrong or what it got changed to?

' save the Drive letter and path
strTmp =
ActiveSheet.Evaluate(ActiveWorkbook.Names("drive.path").RefersTo)(1)
If (strTmp <> CurDir) Then
ActiveWorkbook.Names.Add Name:="drive.path", RefersToR1C1:= _
"={" & Chr(34) & CurDir & Chr(34) & "}"
End If
 

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