[newbie] Macro for "copy and paste"
Dear Jon..........try this
Sub PrintSheet2()
Dim lngRow
Dim wrbMyBook
Set wrbMyBook = ActiveWorkbook
lngRow = 1
Do While wrbMyBook.Sheets("Sheet1").Range("A" & lngRow) < ""
wrbMyBook.Sheets("Sheet2").Range("A1") =
wrbMyBook.Sheets("Sheet1").Range("A" & lngRow)
wrbMyBook.Sheets("Sheet2").PrintOut Copies:=1, Collate:=True
lngRow = lngRow + 1
Loop
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Jon" wrote:
I have an excel sheet which needs to copy values iteratively.
So for example, on sheet 2 I want to
1. copy value of sheet 1 cell A1 to sheet 2 cell A1
2. print it or send it to a print queue
3. clear the values from sheet 2 cell A1
4. copy value of sheet 1 cell A2 to sheet 2 cell A1 (replace contents)
The above process would be repeated for a number of values that is displayed
within sheet 1 cell A1.
Any ideas how to go about it?
|