View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Cimjet[_3_] Cimjet[_3_] is offline
external usenet poster
 
Posts: 157
Default macro to a number + 1 to a cell

Hi Alan
A small macro would do it.
Change the name of the sheet ("Quote") to yours
In the VBA editor under Project select "This workbook" and place the macro on
that sheet..
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Quote").Range("H12").Value = Sheets("Quote").Range("H12").Value + 1
ThisWorkbook.Save
End Sub
HTH
Cimjet


"Alan R" wrote in message
...
i have a quote sheet and in h12 there is the quote number. i want change the
quote number just before i close and save.when i open it again the next number
will appear and i don't have to try to remember that quote number as in 2032 i
hit a micro and the number goes to 2033 and saves

please help