Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have a workbook with two worksheets; which are mainly static,
except for sheet1C12 which gets values from sheet2A2:A30 (or better yet till it hits a blank). Now what I want to do is create a loop that will assing the value of Sheet2A2 into Sheet1C12 (then print); then increment and assing the value of Sheet2A3 into Sheet1C12 (then print again) and so on till a last predefined sheet2Ax or till it hits a blank, I have been reading but cannot find anything similar. Here's what I have so far Sub PrintMacro() Worksheets("Sheet1").Range("C12").Value = Worksheets("Sheet2").Range("A2").Value ActiveSheet.PrintPreview End Sub I know I have to change ActiveSheet.PrintPreview to ActiveSheet.PrintOut, in order to print, but what I need to know is a way to increment A2 into A3, A4.... ect. Is there a for loop in VBA? Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
First page of Excel sheerepeats in print layout or print preview | Excel Discussion (Misc queries) | |||
Macro for Print Loop within Excel | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
How do you Print with a loop? | Excel Programming | |||
Why does macro speed slow after Excel Print or Print Preview? | Excel Programming |