Thread: print with data
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
DavidP[_3_] DavidP[_3_] is offline
external usenet poster
 
Posts: 17
Default print with data

This macro should do the trick

Sub PrintData()
Dim Counter As Integer

Application.ScreenUpdating = False

ActiveSheet.PageSetup.PrintArea = "$A$1:$B$2"

Do
Range("B1") = Range("C1").Offset(Counter, 0)
Range("B2") = Range("C1").Offset(Counter, 1)
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Counter = Counter + 1
Loop Until ActiveCell.Offset(X, 0) = ""

Application.ScreenUpdating = True

End Sub


DavidP

On Mon, 10 Nov 2003 15:31:39 +0800, "ims"
wrote:

Dear all,

I've a worksheet

A B C D
Date 3.1.03 David
Name 4.1.03 Tom
6.1.03 Mary
8.1.03 Roy

The printing area is A1:B2
B1=C1 and B2=D1 for the first printout
B1=C2 and B2=D2 for the second printout
and so on.....

How can I do this?

thanks

ims