N
Nigel
I have a mailing list in excel with the first row being headers. I need to
copy the list one row at a time, transpose the row and paste into a new sheet
in col B which already has the headers vertically in col A. I then need to
print this page, delete the data that has just been pasted and start again
with the next row in the mailing list.
My attempt at performing this task is below (it does'nt work) can anybody
help.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 04/04/2008 by nigel
'
'
Worksheets("Mailing_List").Activate
Range("A2").Activate
Set tbl = ActiveCell.CurrentRegion
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, _
tbl.Columns.Count).Select
For Each rw In Worksheets("Mailing_List").CurrentRegion.Copy
Sheets("Directory").Range("B3").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone,
SkipBlanks:=False _
, Transpose:=True
ActiveSheet.PrintOut
Range("B3:B38").Clear
Next
End Sub
copy the list one row at a time, transpose the row and paste into a new sheet
in col B which already has the headers vertically in col A. I then need to
print this page, delete the data that has just been pasted and start again
with the next row in the mailing list.
My attempt at performing this task is below (it does'nt work) can anybody
help.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 04/04/2008 by nigel
'
'
Worksheets("Mailing_List").Activate
Range("A2").Activate
Set tbl = ActiveCell.CurrentRegion
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, _
tbl.Columns.Count).Select
For Each rw In Worksheets("Mailing_List").CurrentRegion.Copy
Sheets("Directory").Range("B3").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone,
SkipBlanks:=False _
, Transpose:=True
ActiveSheet.PrintOut
Range("B3:B38").Clear
Next
End Sub