Qoutation Sequencial Numbering

H

HVAC SLR

I have a quote template "Quote Sheet11" that I have made up and would like
cell "H4" to increase by 1 each time it is saved/opened... Please help!!!
 
G

Guest

hi,
Private Sub Workbook_Open()
Sheets("yoursheet").select
Range("H4").value = Range("H4").value + 1
end sub
this will add 1 to h4 each time the wb is open.
put the code in This Workbook in the vb editor.
tool>macro>vb editor or alt+F11

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel As Boolean)
Sheets("yoursheet").select
Range("H4").value = Range("H4").value + 1
End Sub
this will add 1 to h4 each time the wb is saved.
put the code in This Workbook.
 
Top