Incrementing a receipt number in Excel 2003 VB form

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi,

Can any one tell me how to do the simple task of having a
receipt number increment automatically in VB code? I
thought that it was as easy as something like:

ReceiptNo = ReceiptNo + 1


Where ReceiptNo is the name of the range where the number
is to appear. However this does not seem to work!

Help would be appreciated.

Tom
 
Tom,

If ReceiptNo is a named range, use code like

Range("ReceiptNo").Value = Range("ReceiptNo").Value + 1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Chip,

Thank you very much, I was nearly there but did not quite
make it.

It now works fine.

.......Tom
 
Back
Top