Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sorry for jumping in but I think I am trying to d something similar.
I have 4 tables within one sheet in one excel file which i need to print 50 times to get a total of 200 copies. I would like each table to have a unique reference number 1,2,3,4. The cells I need to fill are S6, AS6, S59 and AS59, which will have numbers 1-4 on the first sheet printed, (one number per table that is), 5-9 on the second etc. Is it possible to adapt the solution u proposed here to do that? I am completely clueless on VBA. Thanks "Bernie Deitrick" wrote: You could use the before print event to increment a value: Private Sub Workbook_BeforePrint(Cancel As Boolean) Worksheets("Sheet1").Range("A1").Value = Worksheets("Sheet1").Range("A1").Value + 1 End Sub Note that this will only work if you print only one sheet at a time - printing multiple copies only fires this event once. Otherwise, you could use a macro to print multiple copies: Sub PrintEm() Dim i As Integer For i = 1 to 100 Worksheets("Sheet1").Range("A1").Value = Worksheets("Sheet1").Range("A1").Value + 1 Worksheets("Sheet1").PrintOut Next i End Sub HTH, Bernie MS Excel MVP "Nefermet" wrote in message ... I'm trying to create a jobsheet that will automatically increment the jobsheet number each time it is printed. Is this possible? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I WANT TO SET PRINT RANGE TO NUMBER OF COLUMNS | Setting up and Configuration of Excel | |||
Can excel automatically number itself each time you open a documen | Excel Discussion (Misc queries) | |||
how do I put a a sequence number into colun A automatically witho. | Excel Discussion (Misc queries) | |||
How do I automatically pull a new invoice number into an excel te. | Excel Discussion (Misc queries) | |||
Can Excel add a set percentage to a cell automatically when you type in a number | Excel Worksheet Functions |