Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Increment Macro - Order numbers


Hello.

I have set up a worksheet, using the increment macro, which enables me
to send purchase orders via e-mail. Every time i go into the work
sheet, i run the macro and the invoice number increases by one giving
me a unique order number each time. I then save the file as that order
number so i have a copy of the order that was sent.

However, i was wondering whether there would be a way of the order
number increasing by 1 automatically every time i opened the template
(as opposed to every time i open the template i have to run the
macro)?

Any suggestions would be appreciated, thanks.


--
Blues
------------------------------------------------------------------------
Blues's Profile: http://www.excelforum.com/member.php...o&userid=30771
View this thread: http://www.excelforum.com/showthread...hreadid=504383

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Increment Macro - Order numbers

Blues,
Workbooks have a Workbook_Open event which fires every time the workbook is
opened.
Move you increment code to there.

But if this is in a template, where do you store the "next number" ?

NickHK

"Blues" wrote in
message ...

Hello.

I have set up a worksheet, using the increment macro, which enables me
to send purchase orders via e-mail. Every time i go into the work
sheet, i run the macro and the invoice number increases by one giving
me a unique order number each time. I then save the file as that order
number so i have a copy of the order that was sent.

However, i was wondering whether there would be a way of the order
number increasing by 1 automatically every time i opened the template
(as opposed to every time i open the template i have to run the
macro)?

Any suggestions would be appreciated, thanks.


--
Blues
------------------------------------------------------------------------
Blues's Profile:

http://www.excelforum.com/member.php...o&userid=30771
View this thread: http://www.excelforum.com/showthread...hreadid=504383



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Increment Macro - Order numbers


Im pretty new to all of this so...

What is the workbook open event? How do i access it???

How do i store the 'next number'??? Where should i store it?

I've just found this article, trying to plod along through it, is i
applicable to my situation??
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

Many thank

--
Blue
-----------------------------------------------------------------------
Blues's Profile: http://www.excelforum.com/member.php...fo&userid=3077
View this thread: http://www.excelforum.com/showthread.php?threadid=50438

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Increment Macro - Order numbers

Blues,
In the VBA IDE, double click on "ThisWorkbook", then from the drop down at
the top that say "(General)", select "Workbook" and you will get the outline
of the Workbook_Open sub.
I'd say that was pretty much exactly what you are after.

NickHK

"Blues" wrote in
message ...

Im pretty new to all of this so...

What is the workbook open event? How do i access it???

How do i store the 'next number'??? Where should i store it?

I've just found this article, trying to plod along through it, is it
applicable to my situation???
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

Many thanks


--
Blues
------------------------------------------------------------------------
Blues's Profile:

http://www.excelforum.com/member.php...o&userid=30771
View this thread: http://www.excelforum.com/showthread...hreadid=504383



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
Why Excel Does not increment by 2 or 3, odd/even numbers? alsaleh Excel Worksheet Functions 6 November 16th 09 02:06 AM
Automatically Increment Row Numbers Jen New Users to Excel 9 November 19th 08 08:25 AM
Increment and subtract Numbers JohannM Excel Worksheet Functions 2 September 13th 06 06:08 PM
Increment numbers in a column Liz Excel Discussion (Misc queries) 4 August 9th 05 02:10 PM
Auto Increment Rows in between numbers D[_2_] Excel Programming 2 February 28th 05 04:49 PM


All times are GMT +1. The time now is 05:13 AM.

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"