![]() |
Incrementing a receipt number in Excel 2003 VB form
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 |
Incrementing a receipt number in Excel 2003 VB form
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 "Tom" wrote in message ... 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 |
Incrementing a receipt number in Excel 2003 VB form
Chip,
Thank you very much, I was nearly there but did not quite make it. It now works fine. .......Tom -----Original Message----- 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 "Tom" wrote in message ... 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 . |
All times are GMT +1. The time now is 02:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com