Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have rows of data on sheet2 that are put into sheet1 with the belo program. What can I put in to enable me to select all the rows an click the button to print a sheet1 for each row. Basically lik printing an entire workbook with only 2 sheets and a button. Option Explicit Sub Cranial() Dim prtWks As Worksheet Dim actWks As Worksheet Dim myRng As Range Dim myCell As Range Dim iRow As Long Set actWks = ActiveSheet Set prtWks = Worksheets("Sheet1") Set myRng = Intersect(Selection.EntireRow, actWks.Range("a:a")) With prtWks For Each myCell In myRng.Cells iRow = myCell.Row .Range("E7").Value = actWks.Cells(iRow, "A").Value .Range("H7").Value = actWks.Cells(iRow, "B").Value .Range("AY3").Value = actWks.Cells(iRow, "A").Value .Range("BB3").Value = actWks.Cells(iRow, "B").Value .Range("AC5").Value = actWks.Cells(iRow, "C").Value .Range("AK5").Value = actWks.Cells(iRow, "D").Value .Range("AM5").Value = actWks.Cells(iRow, "E").Value Application.Calculate Next myCel -- Optitro ----------------------------------------------------------------------- Optitron's Profile: http://www.excelforum.com/member.php...fo&userid=2672 View this thread: http://www.excelforum.com/showthread.php?threadid=46588 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print Button | Excel Discussion (Misc queries) | |||
print button macro & specific tabs to print | Excel Worksheet Functions | |||
Print button | Excel Discussion (Misc queries) | |||
print button | Excel Discussion (Misc queries) | |||
overriding the print button and File/Print | Excel Programming |