Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create directory
Hi,
How can i create a direcory using VBA if it do not exists? for eg. when i click my command button i want to copy sheet2,sheet3, sheet4 to c:\BkUp\FileName.. so that if the direcory exixts it will save the file or create BkUp directory and save the file ??? TIA Soniya |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create directory
Here is a backup macro I use which should be of help. It will make the
directory if it doesn't already exist. 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 "Soniya" wrote in message ... Hi, How can i create a direcory using VBA if it do not exists? for eg. when i click my command button i want to copy sheet2,sheet3, sheet4 to c:\BkUp\FileName.. so that if the direcory exixts it will save the file or create BkUp directory and save the file ??? TIA Soniya |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I create a quick directory of sheets in workbook | Excel Discussion (Misc queries) | |||
Create Directory Structure from Cell Value. | Excel Discussion (Misc queries) | |||
how can i create a telephone directory from an excel sheet | Excel Discussion (Misc queries) | |||
How can I create a class reunion directory from a spreadsheet? | Excel Discussion (Misc queries) | |||
Create a Backup in Different Directory | Excel Discussion (Misc queries) |