ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I get a number to change after each print? (https://www.excelbanter.com/excel-discussion-misc-queries/153454-how-do-i-get-number-change-after-each-print.html)

Jennifer-Houston, TX

How do I get a number to change after each print?
 
I am trying to set of a shipping form. I want to know if there is a format in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I want
the number to change to 26787 and so on. I don't want to keep using the same
number it will get hard to track pacakges. I believe this is possible I just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX

Nick Hodge[_2_]

How do I get a number to change after each print?
 
Jennifer

You can use a Workbook_BeforePrint() event. To implement right click on the
Excel icon at the top left of the workbook (not the application icon) and
select view code. Paste it in the resulting window

You will need to change the worksheet name from ShippingData to the actual
one and the cell from A1 to whatever it is (in two places). Now each time
you *before* you print, that number will increment by 1

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "ShippingData" Then
ActiveSheet.Range("A1").Value = ActiveSheet.Range("A1").Value + 1
End If
End Sub

--

HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"Jennifer-Houston, TX" <Jennifer-Houston,
wrote in message ...
I am trying to set of a shipping form. I want to know if there is a format
in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I
want
the number to change to 26787 and so on. I don't want to keep using the
same
number it will get hard to track pacakges. I believe this is possible I
just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX



Toppers

How do I get a number to change after each print?
 
See

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

"Jennifer-Houston, TX" wrote:

I am trying to set of a shipping form. I want to know if there is a format in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I want
the number to change to 26787 and so on. I don't want to keep using the same
number it will get hard to track pacakges. I believe this is possible I just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX


Bob I

How do I get a number to change after each print?
 
See this link
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

Jennifer-Houston wrote:

I am trying to set of a shipping form. I want to know if there is a format in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I want
the number to change to 26787 and so on. I don't want to keep using the same
number it will get hard to track pacakges. I believe this is possible I just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX



Jennifer-Houston, TX[_2_]

How do I get a number to change after each print?
 
Thank you!!! That helped a lot!!!

"Bob I" wrote:

See this link
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

Jennifer-Houston wrote:

I am trying to set of a shipping form. I want to know if there is a format in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I want
the number to change to 26787 and so on. I don't want to keep using the same
number it will get hard to track pacakges. I believe this is possible I just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX




Jennifer-Houston, TX[_2_]

How do I get a number to change after each print?
 
Thanks that helped so fast!! Next time I will post my question before I spend
hours trying to figure it out on my own!! Thanks again!!!

"Toppers" wrote:

See

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

"Jennifer-Houston, TX" wrote:

I am trying to set of a shipping form. I want to know if there is a format in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I want
the number to change to 26787 and so on. I don't want to keep using the same
number it will get hard to track pacakges. I believe this is possible I just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX


Jennifer-Houston, TX[_2_]

How do I get a number to change after each print?
 
Thank you for a quick response!! That worked!!

"Nick Hodge" wrote:

Jennifer

You can use a Workbook_BeforePrint() event. To implement right click on the
Excel icon at the top left of the workbook (not the application icon) and
select view code. Paste it in the resulting window

You will need to change the worksheet name from ShippingData to the actual
one and the cell from A1 to whatever it is (in two places). Now each time
you *before* you print, that number will increment by 1

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "ShippingData" Then
ActiveSheet.Range("A1").Value = ActiveSheet.Range("A1").Value + 1
End If
End Sub

--

HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"Jennifer-Houston, TX" <Jennifer-Houston,
wrote in message ...
I am trying to set of a shipping form. I want to know if there is a format
in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I
want
the number to change to 26787 and so on. I don't want to keep using the
same
number it will get hard to track pacakges. I believe this is possible I
just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX




Jennifer-Houston, TX[_2_]

How do I get a number to change after each print?
 
Sorry I spoke to soon...I typed the code in just as you said but it still
doesn't change the number. I still don't know what I am doing wrong? Do you
have any ideas. Thanks Jennifer

"Nick Hodge" wrote:

Jennifer

You can use a Workbook_BeforePrint() event. To implement right click on the
Excel icon at the top left of the workbook (not the application icon) and
select view code. Paste it in the resulting window

You will need to change the worksheet name from ShippingData to the actual
one and the cell from A1 to whatever it is (in two places). Now each time
you *before* you print, that number will increment by 1

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "ShippingData" Then
ActiveSheet.Range("A1").Value = ActiveSheet.Range("A1").Value + 1
End If
End Sub

--

HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"Jennifer-Houston, TX" <Jennifer-Houston,
wrote in message ...
I am trying to set of a shipping form. I want to know if there is a format
in
which I can have a number on the top of my page and it change after every
print I print. I don't know if I am explaining this well so I will give an
example:
No. 26786 for the first print and when I close it and open it again I
want
the number to change to 26787 and so on. I don't want to keep using the
same
number it will get hard to track pacakges. I believe this is possible I
just
don't know how....any help would be greatly appreciated!!! :)
Thanks,
Jennifer - Houston, TX





All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com