Thread: Is there a way?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Is there a way?

This may give you an idea of how to go about it. This creates a backup in
any 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

"John Petty" wrote in message
...
Is there a way to create a directory using Excel VBA?

I am asking because I want to have an application search
for a directory in the users "My Documents" and if it
doesn't exist, create one for the user to save files to.

Thanks,

John Petty