problems with "CurDir"

  • Thread starter Thread starter cubbybear3
  • Start date Start date
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 <> Application.Workbook.Path) Then
ActiveWorkbook.Names.Add Name:="drive.path", RefersToR1C1:= _
"={" & Chr(34) & Application.Workbook.Path & Chr(34) & "}"
End If
 
cubbybear3 submitted this idea :
Application.Workbook.Path


I'm doubtful that this code works in any version of Excel since this
isn't supported by Excel.

And what's with the curly brackets in the RefersTo?
 
You posted some code but it does not include "CurDir", which is where you
say you are getting the error.

Look in Tools, References, I suspect you have one marked MISSING.

Regards,
Peter T
 

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

Back
Top