Saveas VBA question

  • Thread starter Thread starter Lost
  • Start date Start date
L

Lost

OK this code saves the file as the date which is entered into cell B2. Then
places the file in a folder that matches the months number (January = 1,
Febuary = 2,.... December = 12). The folders have to be named with numbers
tho for this to work. How could I tweak this to match January 1 2009 to the
folder named January?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyPath As String
If Target.Address(False, False) = "B2" Then
MyPath = "F:\RS_MS Training\RS Stuffing\3rd Stuff\Penless\TQC\Filled out
Monthly TQC\" & Month(Target.Value) & "\"
ThisWorkbook.SaveAs Filename:=MyPath & Format(Target.Value,
"mmmm-dd-yy") & ".xls"
End If
End Sub
 
instead of

Month(Target.Value)

try

MonthName(Month(Target.Value))

pls click YES if it helped
 
Back
Top