Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sequential number generator

Hello,

I have created an invoice form and wish to be able to
click a button and have Excel generate the next invoice
number in a series. Suggestions?

Thanks,

Karen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default sequential number generator

Karen

You could simply put the following code in the CommandButton Click event

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Range("A1").Value =
Worksheets("Sheet1").Range("A1").Value + 1
End Sub


Change the references as necessary

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Karen Westerman" wrote in message
...
Hello,

I have created an invoice form and wish to be able to
click a button and have Excel generate the next invoice
number in a series. Suggestions?

Thanks,

Karen



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default sequential number generator

Hi,

You will need a place that is going to keep the last
number used somewhere.

If this number is to be available to mulitiple users,
consider using a textfile on a network drive.

You will have to write some VBA code to get and update the
number, taking into consideration that more than one user
might try to get a number at the same moment.

Regards,

Jan Karel Pieterse
Excel TA/MVP

-----Original Message-----
Hello,

I have created an invoice form and wish to be able to
click a button and have Excel generate the next invoice
number in a series. Suggestions?

Thanks,

Karen
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
random number generator pat67 Excel Worksheet Functions 7 May 7th 10 07:42 PM
number generator how can i sequence the middle numbers Excel Discussion (Misc queries) 2 November 10th 08 11:01 PM
random number generator Barb Excel Discussion (Misc queries) 2 September 22nd 06 11:12 PM
same number appears in a random number generator Carmel Excel Worksheet Functions 4 May 28th 06 12:22 AM
Random number generator Philippe L. Balmanno Excel Worksheet Functions 4 December 17th 04 07:42 AM


All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"