Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please explain exactly what you want to do
-- Regards Ron de Bruin http://www.rondebruin.nl "lschuh" wrote in message ... I need to replace January (1) with February (2) To use another macro how would that work with what I already have? "Ron de Bruin" wrote: Have you try the macro ? If you enter 30 it will print 30 pages with in the first 1/1/2004 the seconf 1/2/2004..... -- Regards Ron de Bruin http://www.rondebruin.nl "lschuh" wrote in message ... no I just need 1 copy printed from each day in the entire year. The spreadsheet has been set up to insert a date into cell I1. This has to be done for each day separately. Bummer. What I wanted originally was to do this with some vba code or a macro that would either let me insert the start date and the macro would run, print a page, then goto cell I1 and change the date to the next day of the month and would run until it reached an ending date. I cheated with a macro and like my answer to justahelper had to input all 31 days manually. Now I don't know a way to replace the "1/1/2004" to do the month of February, and so on. Any help is appreciated. "Ron de Bruin" wrote: Do you mean this ? If you fill in 3 it will print the sheet three times with another date Delete "preview:=True" if it is working corect Sub PrintCopies_ActiveSheet() Dim CopiesCount As Long Dim CopieNumber As Long Range("I1").Value = "1/1/2004" CopiesCount = Application.InputBox("How many Copies do you want", Type:=1) For CopieNumber = 1 To CopiesCount ActiveSheet.PrintOut preview:=True Range("I1").Value = Range("I1").Value + 1 Next CopieNumber End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "lschuh" wrote in message ... I can't get a reply to incrementing dates so I manually wrote a macro that would start with Jan 1 2004 then print, go to the next line of code Jan 2 2004 then print. I tried to add lines in between for dates Jan 3, Jan 4, etc. What is printing out is the first select and the last select. What is wrong with it. *I ' the lines out to see the code run but does not print out with the 'references removed Range("I1:J1").Select ActiveCell.FormulaR1C1 = "1/1/2004" Range("I2").Select Application.Goto Reference:="Print_Area" Selection.PrintOut Copies:=1, Collate:=True Range("I1:J1").Select ActiveCell.FormulaR1C1 = "1/2/2004" Range("I2").Select Application.Goto Reference:="Print_Area" Range("I1:J1").Select ActiveCell.FormulaR1C1 = "1/3/2004" Range("I2").Select Application.Goto Reference:="Print_Area" 'Range("I1:J1").Select 'ActiveCell.FormulaR1C1 = "1/4/2004" 'Range("I2").Select 'Application.Goto Reference:="Print_Area" 'Range("I1:J1").Select 'ActiveCell.FormulaR1C1 = "1/5/2004" 'Range("I2").Select Application.Goto Reference:="Print_Area" ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Changes/Prints Document Differently & it also Locks some Cel | Excel Discussion (Misc queries) | |||
Is there a way to default the number times a document prints? | Excel Discussion (Misc queries) | |||
In an excel document the info n row 2 prints out on both pages? He | Excel Discussion (Misc queries) | |||
A 2 line text showing up in the Cell in Excel prints in 1 line | Excel Discussion (Misc queries) | |||
document prints shifted to the right like it is right justified. | Excel Discussion (Misc queries) |