Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code below is suppose to check that cell C2 on the Projections Worksheet
is blank, Then runs the Calendar routine which places the selected date into cell C2 of the Projections Worksheet. This all works fine but the routine fails when it gets to the "ActiveWorkbook.SaveAs sFileName" line. I get an error msg saying "The File name or path does not exist" Any ideas? Private Sub CommandButton1_Click() Sheets("Projections").Select Range("C2").Select If ActiveCell 0 Then GoTo Done Calander.Show Dim sFileName As String, sTest As String sTest = Sheets("Projections").Range("C2").Text If IsDate(sTest) = False Then Exit Sub End If sFileName = "O:\PT_DRIVER_SCHED\Weekly Projections\" & _ Format(sTest, "yyyy\\MM-dd-yy") & " Projection" & ".xls" ActiveWorkbook.SaveAs sFileName Done: End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add-ins missing | Excel Worksheet Functions | |||
Toolbars Missing, And option to Add Missing | Excel Discussion (Misc queries) | |||
On Error? Creates 1 missing worksheet then never detects any other missing worksheets | Excel Programming | |||
Missing Row | Excel Worksheet Functions | |||
Add-ins missing | Excel Programming |