right ho,
may be incredibly straightforward this (I hope it is) I'm using excel 2007 - i've created a macro enabled template file, and I'm wanting to include some code that will allow me to automatically save in a folder location using the name from a cell, but I still want to be able to use macros in the saved spreadsheet, i assumed it would be a simple case of changing the file extension to .xlsm, but this returns an error, i can get the file to save as a standard workbook, so i'm a bit lost - below is the code i've been using
Sub SaveBook()
Dim sFile As String
sFile = Range("J8") & ".xlsx"
ActiveWorkbook.SaveAs Filename:="O:\Mobile Plant\General\Budgeting & part expenditure\" & sFile
End Sub
any help most appreciated!
Cheers
may be incredibly straightforward this (I hope it is) I'm using excel 2007 - i've created a macro enabled template file, and I'm wanting to include some code that will allow me to automatically save in a folder location using the name from a cell, but I still want to be able to use macros in the saved spreadsheet, i assumed it would be a simple case of changing the file extension to .xlsm, but this returns an error, i can get the file to save as a standard workbook, so i'm a bit lost - below is the code i've been using
Sub SaveBook()
Dim sFile As String
sFile = Range("J8") & ".xlsx"
ActiveWorkbook.SaveAs Filename:="O:\Mobile Plant\General\Budgeting & part expenditure\" & sFile
End Sub
any help most appreciated!
Cheers