View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default CELL Function in VBA ?

Sub mypathis()
'MsgBox ActiveWorkbook.Path
'MsgBox ActiveWorkbook.Name
With ActiveWorkbook
MsgBox .Path & "\" & .Name
End With
End Sub


--
Don Guillett
SalesAid Software

"Jakobshavn Isbrae" wrote in
message ...
The formula
=CELL("filename",A1) gives me something like
C:\Documents and Settings\Owner\Desktop\[Book1.xls]Sheet1


in VBA
s = Application.WorksheetFunction.Cell("filename", A1)
does nothing. How can I get the same string in VBA that CELL() gives me
in
the worksheet?

Thanks in advance for any help or suggestions.
--
jake