I need a code that will, when you hit save, take the value from A12 and H10 and use it as the file name to save it to the folder "time sheets".
Can anyone give me a hand?
I need a code that will, when you hit save, take the value from A12 and H10 and use it as the file name to save it to the folder "time sheets".
Can anyone give me a hand?
[vba]
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim sFile
Application.EnableEvents = False
'<Optional - this would be before save code>
If SaveAsUI Then
'continue
Else
Cancel = True
ThisWorkbook.SaveAS Activesheet.Range("A12").Value & Activesheet.Range("H10").Value
End If
Application.EnableEvents = True
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
That code did even less. Any other solutions?