Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
John
 
Posts: n/a
Default incrementing account numbers

Hi,

I'm having a lot of issues here understanding how to use a the macro's with
an Excel 2003 workbook.

The scenario is to create an invoice and each must have a different invoice
number which will be incremented by 1 each time I use the workbook. I'll
actually want to save-as the workbook to a new one per invoice.

I spent the afternoon reading threads and trying out various macro's and got
myself totally lost. In the end I deleated the workbook which had about 10
different macro's in it. I'd like to just start all over from scratch. The
invoice itself isn't complicated and can be drawn up in 10 minutes, it is
just increasing the invoice number that I have trouble with.

I'd like to know why MS didn't just include this.. it has everything else.
  #2   Report Post  
Posted to microsoft.public.excel.misc
L. Howard Kittle
 
Posts: n/a
Default incrementing account numbers

Hi John,

Have a look here, J.E. has it figured out quite nicely.

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

HTH
Regards,
Howard

"John" wrote in message
...
Hi,

I'm having a lot of issues here understanding how to use a the macro's
with
an Excel 2003 workbook.

The scenario is to create an invoice and each must have a different
invoice
number which will be incremented by 1 each time I use the workbook. I'll
actually want to save-as the workbook to a new one per invoice.

I spent the afternoon reading threads and trying out various macro's and
got
myself totally lost. In the end I deleated the workbook which had about
10
different macro's in it. I'd like to just start all over from scratch.
The
invoice itself isn't complicated and can be drawn up in 10 minutes, it is
just increasing the invoice number that I have trouble with.

I'd like to know why MS didn't just include this.. it has everything else.



  #3   Report Post  
Posted to microsoft.public.excel.misc
kevindmorgan
 
Posts: n/a
Default incrementing account numbers


John,

Someone had the same problem yesterday, and I offered this solution.
She needed a step-by-step, so I'll paste that in.

Edit the macro to fit your needs as follows:

1. Replace "whicheversheet" with the name of your worksheet.
2. Replace "Cells(1,1)" (both instances) with whatever address you want
to use on your worksheet to count. The first number is the row, the
second is the column. In my case, it references A1.
3. Open MS VB Editor. (ToolsMacrosVisual Basic Editor)
4. Click InsertModule
5. Copy and paste the macro in the module (edit as stated above if you
haven't already) and close VB Editor.
6. Save the workbook, close it and open it again. Each time you close,
be sure to save and whenever you open it, the referenced cell value
will increase by one.

Let me know how yah did!

Kevin

=======edit the macro!!============

Sub Auto_Open()
Sheets("whicheversheet").select
Cells(1, 1).Value = Cells(1, 1).Value + 1
End Sub

=====end copy====================



John Wrote:
Hi,

I'm having a lot of issues here understanding how to use a the macro's
with
an Excel 2003 workbook.

The scenario is to create an invoice and each must have a different
invoice
number which will be incremented by 1 each time I use the workbook.
I'll
actually want to save-as the workbook to a new one per invoice.

I spent the afternoon reading threads and trying out various macro's
and got
myself totally lost. In the end I deleated the workbook which had
about 10
different macro's in it. I'd like to just start all over from scratch.
The
invoice itself isn't complicated and can be drawn up in 10 minutes, it
is
just increasing the invoice number that I have trouble with.

I'd like to know why MS didn't just include this.. it has everything
else.



--
kevindmorgan
------------------------------------------------------------------------
kevindmorgan's Profile: http://www.excelforum.com/member.php...o&userid=32232
View this thread: http://www.excelforum.com/showthread...hreadid=520795

  #4   Report Post  
Posted to microsoft.public.excel.misc
John
 
Posts: n/a
Default incrementing account numbers

Thanks

It seems to try and work, but I'm getting a message saying that macro's are
disabled because of a high security level and I can either lower it or
request that macros be digitally signed... What security? In excel or a
firewall or what?

Also, I forgot to meantion that in another cell the invoice number has to
appear. The cells are E 1 and E 19. Do I have to make two macro's?

John

"L. Howard Kittle" wrote:

Hi John,

Have a look here, J.E. has it figured out quite nicely.

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

HTH
Regards,
Howard

"John" wrote in message
...
Hi,

I'm having a lot of issues here understanding how to use a the macro's
with
an Excel 2003 workbook.

The scenario is to create an invoice and each must have a different
invoice
number which will be incremented by 1 each time I use the workbook. I'll
actually want to save-as the workbook to a new one per invoice.

I spent the afternoon reading threads and trying out various macro's and
got
myself totally lost. In the end I deleated the workbook which had about
10
different macro's in it. I'd like to just start all over from scratch.
The
invoice itself isn't complicated and can be drawn up in 10 minutes, it is
just increasing the invoice number that I have trouble with.

I'd like to know why MS didn't just include this.. it has everything else.




  #5   Report Post  
Posted to microsoft.public.excel.misc
kevindmorgan
 
Posts: n/a
Default incrementing account numbers


To enable macros:

ToolsMacroSecurity

In Security Level Tab, set to Medium.

For the second cell. Just add the other cell in the macro:

Sub Auto_Open()
Sheets("whicheversheet").select
Cells(1, 5).Value = Cells(1, 5).Value + 1
Cells(19, 5).Value = Cells(19, 5).Value + 1
End Sub


--
kevindmorgan
------------------------------------------------------------------------
kevindmorgan's Profile: http://www.excelforum.com/member.php...o&userid=32232
View this thread: http://www.excelforum.com/showthread...hreadid=520795



  #6   Report Post  
Posted to microsoft.public.excel.misc
John
 
Posts: n/a
Default incrementing account numbers

Thanks for the help. The security issue that I had was in Excel, I did a
search using the Office Assistant. Sorry for no immediate reply, I just
needed to get away from looking at office for the rest of the night.

John.

"kevindmorgan" wrote:


John,

Someone had the same problem yesterday, and I offered this solution.
She needed a step-by-step, so I'll paste that in.

Edit the macro to fit your needs as follows:

1. Replace "whicheversheet" with the name of your worksheet.
2. Replace "Cells(1,1)" (both instances) with whatever address you want
to use on your worksheet to count. The first number is the row, the
second is the column. In my case, it references A1.
3. Open MS VB Editor. (ToolsMacrosVisual Basic Editor)
4. Click InsertModule
5. Copy and paste the macro in the module (edit as stated above if you
haven't already) and close VB Editor.
6. Save the workbook, close it and open it again. Each time you close,
be sure to save and whenever you open it, the referenced cell value
will increase by one.

Let me know how yah did!

Kevin

=======edit the macro!!============

Sub Auto_Open()
Sheets("whicheversheet").select
Cells(1, 1).Value = Cells(1, 1).Value + 1
End Sub

=====end copy====================



John Wrote:
Hi,

I'm having a lot of issues here understanding how to use a the macro's
with
an Excel 2003 workbook.

The scenario is to create an invoice and each must have a different
invoice
number which will be incremented by 1 each time I use the workbook.
I'll
actually want to save-as the workbook to a new one per invoice.

I spent the afternoon reading threads and trying out various macro's
and got
myself totally lost. In the end I deleated the workbook which had
about 10
different macro's in it. I'd like to just start all over from scratch.
The
invoice itself isn't complicated and can be drawn up in 10 minutes, it
is
just increasing the invoice number that I have trouble with.

I'd like to know why MS didn't just include this.. it has everything
else.



--
kevindmorgan
------------------------------------------------------------------------
kevindmorgan's Profile: http://www.excelforum.com/member.php...o&userid=32232
View this thread: http://www.excelforum.com/showthread...hreadid=520795


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
Match Last Occurrence of two numbers and Return Date Sam via OfficeKB.com Excel Worksheet Functions 6 April 5th 05 12:40 PM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
Count and Sum Total occurrances of two specific numbers Sam via OfficeKB.com Excel Worksheet Functions 10 March 29th 05 08:13 PM
How do I delete 100 account numbers from a spreadsheet colume wer. Ndubuisi Azuogu Excel Worksheet Functions 2 November 11th 04 04:11 PM
How do I setup a list box that has several account numbers so use. Jackie Excel Worksheet Functions 1 November 8th 04 07:03 PM


All times are GMT +1. The time now is 06:00 PM.

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

About Us

"It's about Microsoft Excel"