If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I set-up automatic number generation in Excel?
hi again
i don't know how you are set up nor what you are doing so this is just sample code. tested on you play form. it works but i would set it up so that adding 1 to the lable caption occurs after you have complete what ever it is you are doing in the form. this is to prevent loosing numbers. with a form i assume you are entering data and populating a database. so call the label caption with line 1 below. enter you data into the form. if you add the data to your db then add 1 to the label caption. if you don't add the form data then don't add 1 to the label caption. good luck. Private Sub CommandButton1_Click() Me.TextBox1 = Me.Label1.Caption Me.Label1.Caption = Me.TextBox1 + 1 End Sub -----Original Message----- This sounds great! But I am not an excel pro. Can you give me some pointers on how to intragrate. Thanks in advance for the tip " wrote: assuming that u want sequential numbering... two ways i can think of. 1.put the number on a sheet and have code call the number to the form. for next number, have code add 1 to the to the number on the sheet. 2. put a hidden lable on the form. put the number in the lable's caption. have code call the lable's caption to the text box. for next number have code add 1 to the label's caption. -----Original Message----- I have a form setup in Excel. I want to add an automatic number generation field to this form. Is that possible and how do I do this? The form was originally developed in Excel (Office XP). My users are using Office 2000. . . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible to record a number with a leading zero in Excel? | Jonathan HB | General Discussion | 4 | November 8th, 2004 01:44 PM |
In Excel Sheet how I can give Number bullets in the series of cell | Alpesh Patel | General Discussion | 4 | October 8th, 2004 10:14 PM |
Add-in functions when starting Excel programmatically | Steve K. | Worksheet Functions | 11 | July 2nd, 2004 06:38 PM |