Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Before print increment counter

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Before print increment counter

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Before print increment counter

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
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
How do i set up a counter? Bulldog21 Excel Discussion (Misc queries) 2 July 23rd 08 02:12 PM
Increment a counter in Excel COSdl Excel Worksheet Functions 2 March 4th 05 09:47 PM
How do I auto increment cell value on print in Excel Hiren Excel Worksheet Functions 7 January 25th 05 06:39 PM
Print increment by 1 Paul D Excel Worksheet Functions 0 January 16th 05 04:07 PM
automatic counter or auto-increment Jjt Excel Programming 1 January 16th 04 07:56 PM


All times are GMT +1. The time now is 07:55 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"