Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I was wondering if any one could help me. I have designed a
standard sheet, nothing fancy. This may be very easy for most of you and is my first time programming in Excel. What I want to do is before a page prints I want a number to incremen eg. If i want to print this form 50 times the number will increment from - 50 so I will then end up with 50 copies. I understand this could b done the long way by me cutting and pasting the sheet 50 times an inserting page breaks, but what I want to do is save it after, so whe I come back to print some more it will start from 51. If any one could help it would be much appreciated. Thank you for you time. Ashle -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try the following VBA code (put it in your workbook module - not in a standard module). It will increment cell A1 on sheet1: Private Sub Workbook_BeforePrint(Cancel As Boolean) worksheets("Sheet1").Range("A1").value = _ worksheets("Sheet1").Range("A1").value + 1 End Sub -- Regards Frank Kabel Frankfurt, Germany Hi, I was wondering if any one could help me. I have designed a a standard sheet, nothing fancy. This may be very easy for most of you, and is my first time programming in Excel. What I want to do is before a page prints I want a number to increment eg. If i want to print this form 50 times the number will increment from 1 - 50 so I will then end up with 50 copies. I understand this could be done the long way by me cutting and pasting the sheet 50 times and inserting page breaks, but what I want to do is save it after, so when I come back to print some more it will start from 51. If any one could help it would be much appreciated. Thank you for you time. Ashley --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, have tried this, but does not seem to work, this is a screen sho
attached to this message. Also will this code work say if I go to prin and want 50 copies of the same worksheet, will is increment 50 times did try some code that did it if you go to print each time but did no increment the number to 50. Hope you can help more, and thank you for your quick reply. Ashle Attachment filename: screenshot.gif Download attachment: http://www.excelforum.com/attachment.php?postid=50244 -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i set up a counter? | Excel Discussion (Misc queries) | |||
Increment a counter in Excel | Excel Worksheet Functions | |||
How do I auto increment cell value on print in Excel | Excel Worksheet Functions | |||
Print increment by 1 | Excel Worksheet Functions | |||
automatic counter or auto-increment | Excel Programming |