View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Path where Workbook is saved

=LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)))
produces
C:\Data\[Stats Manager.Xls]

to remove the brackets

=substitute(Substitute(formula,"]",""),"[","")

=SUBSTITUTE(SUBSTITUTE(LEFT(CELL("filename",A1),FI ND("]",CELL("filename",A1)
)),"]",""),"[","")

--
Regards,
Tom Ogilvy


Todd Huttenstine wrote in message
...
What is the code that will detect the patch of where the
Active Workbook is saved and put that in cell A1? For
instance the Activate workbook is called Stats Manager and
is saved in C:\Data\Stats Manager.Xls. When the code is
run I need for it to put the value "C:\Data\Stats
Manager.Xls" in cell A1.


Thanx

Todd