Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook.SaveAs
This code did work before.... All I am trying to do is a SaveAs to another directory. I am using Office 2003.... I get no errors but the SaveAs function doesn't rename the current workbook that is open nor does it savea copy to the forlder specified...what gives? Here is my code: Sub SaveAsFile() Dim strDocName As String Const FilePath As String = "H:\Client\" On Error GoTo err_handler ChDrive FilePath ChDir FilePath strDocName = Application.GetSaveAsFilename(filefilter:="*.xls, *.xls") If strDocName < "False" Then 'do not allow it to be stored in the local directory If (Left(strDocName, 33) = "H:\Client\Deliverables Schedules") Then MsgBox "This schedule must be saved to the appropriate folder on H:\Client!", vbCritical, "Wrong Folder" Cancel = True Else ActiveWorkbook.SaveAs strDocName End If End If Exit Sub err_handler: MsgBox Err.Number & " " & Err.Description End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SaveAs uses current open workbook filename; | Excel Programming | |||
Workbook::SaveAs() in MFC - Please help! | Excel Programming | |||
worksheet saveas workbook | Excel Programming | |||
Canceling SaveAs dialog box without saving workbook | Excel Programming | |||
Workbook.SaveAs | Excel Programming |