close

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.

Hi John,

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

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

HTH
Regards,
Howard

quot;Johnquot; gt; wrote in message
...
gt; Hi,
gt;
gt; I'm having a lot of issues here understanding how to use a the macro's
gt; with
gt; an Excel 2003 workbook.
gt;
gt; The scenario is to create an invoice and each must have a different
gt; invoice
gt; number which will be incremented by 1 each time I use the workbook. I'll
gt; actually want to save-as the workbook to a new one per invoice.
gt;
gt; I spent the afternoon reading threads and trying out various macro's and
gt; got
gt; myself totally lost. In the end I deleated the workbook which had about
gt; 10
gt; different macro's in it. I'd like to just start all over from scratch.
gt; The
gt; invoice itself isn't complicated and can be drawn up in 10 minutes, it is
gt; just increasing the invoice number that I have trouble with.
gt;
gt; I'd like to know why MS didn't just include this.. it has everything else.

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 quot;whicheversheetquot; with the name of your worksheet.
2. Replace quot;Cells(1,1)quot; (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. (Toolsgt;Macrosgt;Visual Basic Editor)
4. Click Insertgt;Module
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(quot;whicheversheetquot;).select
Cells(1, 1).Value = Cells(1, 1).Value 1
End Sub

=====end copy====================
John Wrote:
gt; Hi,
gt;
gt; I'm having a lot of issues here understanding how to use a the macro's
gt; with
gt; an Excel 2003 workbook.
gt;
gt; The scenario is to create an invoice and each must have a different
gt; invoice
gt; number which will be incremented by 1 each time I use the workbook.
gt; I'll
gt; actually want to save-as the workbook to a new one per invoice.
gt;
gt; I spent the afternoon reading threads and trying out various macro's
gt; and got
gt; myself totally lost. In the end I deleated the workbook which had
gt; about 10
gt; different macro's in it. I'd like to just start all over from scratch.
gt; The
gt; invoice itself isn't complicated and can be drawn up in 10 minutes, it
gt; is
gt; just increasing the invoice number that I have trouble with.
gt;
gt; I'd like to know why MS didn't just include this.. it has everything
gt; else.--
kevindmorgan
------------------------------------------------------------------------
kevindmorgan's Profile: www.excelforum.com/member.php...oamp;userid=32232
View this thread: www.excelforum.com/showthread...hreadid=520795Thanks

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

quot;L. Howard Kittlequot; wrote:

gt; Hi John,
gt;
gt; Have a look here, J.E. has it figured out quite nicely.
gt;
gt; www.mcgimpsey.com/excel/udfs/sequentialnums.html
gt;
gt; HTH
gt; Regards,
gt; Howard
gt;
gt; quot;Johnquot; gt; wrote in message
gt; ...
gt; gt; Hi,
gt; gt;
gt; gt; I'm having a lot of issues here understanding how to use a the macro's
gt; gt; with
gt; gt; an Excel 2003 workbook.
gt; gt;
gt; gt; The scenario is to create an invoice and each must have a different
gt; gt; invoice
gt; gt; number which will be incremented by 1 each time I use the workbook. I'll
gt; gt; actually want to save-as the workbook to a new one per invoice.
gt; gt;
gt; gt; I spent the afternoon reading threads and trying out various macro's and
gt; gt; got
gt; gt; myself totally lost. In the end I deleated the workbook which had about
gt; gt; 10
gt; gt; different macro's in it. I'd like to just start all over from scratch.
gt; gt; The
gt; gt; invoice itself isn't complicated and can be drawn up in 10 minutes, it is
gt; gt; just increasing the invoice number that I have trouble with.
gt; gt;
gt; gt; I'd like to know why MS didn't just include this.. it has everything else.
gt;
gt;
gt;


To enable macros:

Toolsgt;Macrogt;Security

In Security Level Tab, set to Medium.

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

Sub Auto_Open()
Sheets(quot;whicheversheetquot;).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: www.excelforum.com/member.php...oamp;userid=32232
View this thread: www.excelforum.com/showthread...hreadid=520795Thanks 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.

quot;kevindmorganquot; wrote:

gt;
gt; John,
gt;
gt; Someone had the same problem yesterday, and I offered this solution.
gt; She needed a step-by-step, so I'll paste that in.
gt;
gt; Edit the macro to fit your needs as follows:
gt;
gt; 1. Replace quot;whicheversheetquot; with the name of your worksheet.
gt; 2. Replace quot;Cells(1,1)quot; (both instances) with whatever address you want
gt; to use on your worksheet to count. The first number is the row, the
gt; second is the column. In my case, it references A1.
gt; 3. Open MS VB Editor. (Toolsgt;Macrosgt;Visual Basic Editor)
gt; 4. Click Insertgt;Module
gt; 5. Copy and paste the macro in the module (edit as stated above if you
gt; haven't already) and close VB Editor.
gt; 6. Save the workbook, close it and open it again. Each time you close,
gt; be sure to save and whenever you open it, the referenced cell value
gt; will increase by one.
gt;
gt; Let me know how yah did!
gt;
gt; Kevin
gt;
gt; =======edit the macro!!============
gt;
gt; Sub Auto_Open()
gt; Sheets(quot;whicheversheetquot;).select
gt; Cells(1, 1).Value = Cells(1, 1).Value 1
gt; End Sub
gt;
gt; =====end copy====================
gt;
gt;
gt;
gt; John Wrote:
gt; gt; Hi,
gt; gt;
gt; gt; I'm having a lot of issues here understanding how to use a the macro's
gt; gt; with
gt; gt; an Excel 2003 workbook.
gt; gt;
gt; gt; The scenario is to create an invoice and each must have a different
gt; gt; invoice
gt; gt; number which will be incremented by 1 each time I use the workbook.
gt; gt; I'll
gt; gt; actually want to save-as the workbook to a new one per invoice.
gt; gt;
gt; gt; I spent the afternoon reading threads and trying out various macro's
gt; gt; and got
gt; gt; myself totally lost. In the end I deleated the workbook which had
gt; gt; about 10
gt; gt; different macro's in it. I'd like to just start all over from scratch.
gt; gt; The
gt; gt; invoice itself isn't complicated and can be drawn up in 10 minutes, it
gt; gt; is
gt; gt; just increasing the invoice number that I have trouble with.
gt; gt;
gt; gt; I'd like to know why MS didn't just include this.. it has everything
gt; gt; else.
gt;
gt;
gt; --
gt; kevindmorgan
gt; ------------------------------------------------------------------------
gt; kevindmorgan's Profile: www.excelforum.com/member.php...oamp;userid=32232
gt; View this thread: www.excelforum.com/showthread...hreadid=520795
gt;
gt;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()