save as a particular name
-
Does anyone know how I might use a button on a form to save spreadsheets into a named directory and to pick from the spreadsheet the save as name? Ie each time it is opened it will be given a unique id no by the user into a particular cell on the sheet. I would like to be able to click on a button to close the spreadsheet and save it as the id no in a name directory - say c:/mydocuments. So my directory will fill up with lots of uniquely named spreadsheets. The unique id no would be held in cell B6 many thanks in advance
-
Does anyone know how I might use a button on a form to save spreadsheets into a named directory and to pick from the spreadsheet the save as name? Ie each time it is opened it will be given a unique id no by the user into a particular cell on the sheet. I would like to be able to click on a button to close the spreadsheet and save it as the id no in a name directory - say c:/mydocuments. So my directory will fill up with lots of uniquely named spreadsheets. The unique id no would be held in cell B6 many thanks in advance
You can record a macro bu trouble is when recording a macro you cant use the cut and paste functions properly. I know that I want to do: siv = ActiveSheet.Cells(6, 2).Value ActiveWorkbook.SaveAs Filename:="C:\My Documents\"&siv".xls", FileFormat:= xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False but of course it doesnt like me stuffing the siv variable in like that so I am snookered. There is the save method NewBook.SaveAs Filename:=fName so I can swap fname for siv, but this doesnt let me state where it has to be saved :eek: