I'm a very basic excel user and setting up a quote form for a small business. The boss wants the quote numbers to generate automatically each time a new quote is started, is there a way to do this easily?
ActiveWorkbook.SaveCopyAs "C:\[COLOR=red]YOUR\FILE\PATH[/COLOR]\" & Sheets("Quote").Range("H4") & ".[COLOR=black]XLSM[/COLOR] "
Sheets("[COLOR=red]Quote[/COLOR]").Range("H4").Value = Sheets("[COLOR=red]Quote[/COLOR]").Range("H4").Value + 1
In your Quote workbook, press Alt+F11
Use the keystrokes Alt - I - M to insert a module
Paste the code
Now make changes to the code in the areas highlighted in red
(Enter your file path and your sheet name to the "template quote sheet")
close the Visual Basic Editor
Now insert a button onto the quote sheet and assign this macro (SaveQuote)
When you press the button, the quote should be saved as the quote number and the quote number should add 1 and save also.
This could be made better as it does not handle any errors, yet it seems a good place to start.