Qoutation Sequencial Numbering

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!!!
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top