Save Button in Excel
I want to add a Save button on to an Excel spreadsheet that will
automatically save the sheet to a predetermined location with a filename like Mike08March07. The idea is that the user can open the template file everyday and each days recordings will be saved into the predetermined location e,g F:/Jobs2007/. I dont want to create a form but just add a button from the Control Toolbox, drop it onto the worksheet and write the code for it.Does anyone know how to do this? |
Save Button in Excel
On Mar 8, 2:31 pm, wrote:
I want to add a Save button on to an Excel spreadsheet that will automatically save the sheet to a predetermined location with a filename like Mike08March07. The idea is that the user can open the template file everyday and each days recordings will be saved into the predetermined location e,g F:/Jobs2007/. I dont want to create a form but just add a button from the Control Toolbox, drop it onto the worksheet and write the code for it.Does anyone know how to do this? This will save with todays date. Sub SaveIt() Dim FullName as String FullName = "Mike" & Format(Date, "dd mmm yy") & ".xls" ThisWorkbook.SaveAs ("F:\Jobs2007" & "\" & FullName) End Sub Add a button from the forms menu (View, Toolbars, forms). Click on New when it asks for a macro and paste in the above macro instead of the one offered. Go back to the sheet with the button on, right click it and select the above macro to attach. regards Paul |
Save Button in Excel
lucky you
i created a similar macro ActiveWorkbook.SaveAs FileName:=strSavePath & strBestandsnaam in this case the filename is just a string ;-) good luck! " wrote: I want to add a Save button on to an Excel spreadsheet that will automatically save the sheet to a predetermined location with a filename like Mike08March07. The idea is that the user can open the template file everyday and each days recordings will be saved into the predetermined location e,g F:/Jobs2007/. I dont want to create a form but just add a button from the Control Toolbox, drop it onto the worksheet and write the code for it.Does anyone know how to do this? |
All times are GMT +1. The time now is 07:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com