LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Increment number in cell before printing

Hi, does any one know how to Increment number in cell before printing
eg if i want 50 copies of a sheet the number will increment from 1 t
50. I have looked at all the examples that are dotted on thi site an
none of them work. Have tried either putting the code in the work boo
and the sheet and still nothing. These are the ones I have found s
far:-


'Private Sub Workbook_BeforePrint(Cancel As Boolean)
'Worksheets("Sheet1").Select
'Range("A1").Value = Range("A1") + 1
'ActiveSheet.PageSetup.CenterFooter = Range("G3").Value = Range("G3")
1
'End Sub

'Private Sub Workbook_Open()
'Worksheets("Sheet1").Select
'Range("A1").Value = Range("A1") + 1
'End Sub

'Sub TestMe()
'Dim HowMany As Integer
'Dim StartNum As Integer
'If Range("A1").Value = "" Then Range("A1").Value = 1
'HowMany = InputBox("How many Invoices to print starting at " &
'Range("A1").Value)
'StartNum = Range("A1").Value
'Dim i As Integer
'For i = StartNum To StartNum + HowMany - 1
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
'Range("A1").Value = Range("A1").Value + 1
'Next i
'End Sub

'Private Sub Workbook_BeforePrint(Cancel As Boolean)
'Worksheets("Sheet1").Range("A1").Value = _
'Worksheets("Sheet1").Range("A1").Value + 1
'End Sub



Any ideas

Thanks

Ashle

--
Message posted from http://www.ExcelForum.com

 
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 to increment page number in a cell of worksheet Zubair Excel Discussion (Misc queries) 2 February 5th 10 01:46 PM
Formula to Increment a number upon a match in an adjacent cell Nolene Excel Worksheet Functions 9 October 2nd 09 10:04 PM
How do I get a cell to increment during printing Brian Excel Discussion (Misc queries) 4 June 17th 09 07:55 PM
Increment a number in a cell for each page printed Steve Vincent Excel Discussion (Misc queries) 6 June 19th 06 11:12 PM
number cell increment +1 when dragging down box Johnny Cake Excel Worksheet Functions 4 August 18th 05 07:29 PM


All times are GMT +1. The time now is 11:45 PM.

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"