--
excelforautomatinginvoicing
Suppose the filename was in cell C5 one could use something like this to
save the file with that name when you clicked the Save toolbar button.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:=Sheets("Sheet1").[C5]
Cancel = True
End Sub
--
If this helps, please click the Yes button.
Cheers,
Shane Devenshire
6.How can I create a micro which will do the above for me.
Thanks
excelforautomatinginvoicing
6.How can I create a micro which will do the above for me.
Thanks
--
excelforautomatinginvoicing
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:="K:QUOTATIONS\" & Sheets("Sheet1").[C7] &
"\" & Sheets("Sheet1").[F7]
Cancel = True
End Sub
This code assumes you have folders already in place with the desired names?
Sub SAVEFILEQUOTATION()
' Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:="K:\QUOTATIONS\" & Sheets("Sheet1").[C7] &
"\" & Sheets("Sheet1").[F7]
End Sub
I get the error 9
subscript out of range
excelforautomatinginvoicing
1.Thanks for your help
2."K:" was the drive in the server and I was getting the error 9
3.I changed the micro to C: as follows and it started working.
ActiveWorkbook.SaveAs Filename:="C:\QUOTATIONS\" & Sheets("Sheet1").[C7] &
> "\" & Sheets("Sheet1").[F7]
4. Is it possible to save it in the server in "K:" drive
5. I have a customer worksheet in which I enter for each new customer:
"code, name,address" using the FORM option under DATA
6.Can I write a micro which will create a folder for each new customer I add
to the list
--
excelforautomatinginvoicing
excelforautomatinginvoicing