View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default path of workbook

try
activeworkbook.path

Here is a backup file I use to backup to the current directory.

Sub Backup() 'kept in personal.xls & assigned to toolbar button
On Error GoTo BackupFile
MkDir CurDir & "\Backup"
BackupFile:
With ActiveWorkbook
MyWB = .Path & "\BACKUP\" & .Name
.SaveCopyAs MyWB
.Save
End With
End Sub
--
Don Guillett
SalesAid Software

"fabalicious " wrote in message
...
With

ActiveWorkbook.FullName

i can get the full path of my active workbook. Using .Name instead only
the file name. how can i get ONLY the path without the filename?

is there a predefined function for it? if not, has anyone any idea how
to chop of the last bit ("/filename.xls")?

Come on, big props to the one sweetening my weekend by giving me the
illusion of having solved everything i need for my macro...
(it's 15:30 here already ;-))

Fabalicious


---
Message posted from
http://www.ExcelForum.com/