A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I set-up automatic number generation in Excel?



 
 
Thread Tools Display Modes
  #1  
Old November 16th, 2004, 04:58 PM
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.