I'm creating a purchase order form in Excel. I would like the purchase order number (in, say, cell A7) to automatically change to the next consecutive number each time I open the file. Is there a way to do that?
I'm creating a purchase order form in Excel. I would like the purchase order number (in, say, cell A7) to automatically change to the next consecutive number each time I open the file. Is there a way to do that?
I am considering that cell a7 that you want to increment is in Worksheet Sheet1.
paste the below code in "This Workbook" in vba editor.
Private Sub Workbook_Open()
Worksheets("Sheet1").Range("a7").Value = Worksheets("Sheet1").Range("a7").Value + 1
End Sub
Thanks, Anil. I'll hang on to this; I also have another idea that mimics another project I was doing before that I think will work, too.
Won't that change each time you open the workbook. so when you first enter
the purchase order, it will be number 1. Then the next time you look at or
edit it it will be number 2 and the next time number 3.
--
Regards,
Tom Ogilvy
"amyenoch" <amyenoch.1pydmi_1117638315.9566@excelforum-nospam.com> wrote in
message news:amyenoch.1pydmi_1117638315.9566@excelforum-nospam.com...
>
> Thanks, Anil. I'll hang on to this; I also have another idea that
> mimics another project I was doing before that I think will work, too.
>
>
> --
> amyenoch
> ------------------------------------------------------------------------
> amyenoch's Profile:
http://www.excelforum.com/member.php...o&userid=23337
> View this thread: http://www.excelforum.com/showthread...hreadid=375620
>
http://www.mcgimpsey.com/excel*/udfs...ntialnums.html
--
Regards,
Tom Ogilvy
"amyenoch" <amyenoch.1pyaur_1117634723.7517@excelforum-nospam.com> wrote in
message news:amyenoch.1pyaur_1117634723.7517@excelforum-nospam.com...
>
> I'm creating a purchase order form in Excel. I would like the purchase
> order number (in, say, cell A7) to automatically change to the next
> consecutive number each time I open the file. Is there a way to do
> that?
>
>
> --
> amyenoch
> ------------------------------------------------------------------------
> amyenoch's Profile:
http://www.excelforum.com/member.php...o&userid=23337
> View this thread: http://www.excelforum.com/showthread...hreadid=375620
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks