LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print Button


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Button Pass-the-Reality Excel Discussion (Misc queries) 1 March 31st 10 02:05 PM
print button macro & specific tabs to print Chuck[_3_] Excel Worksheet Functions 2 November 22nd 07 12:21 AM
Print button [email protected] Excel Discussion (Misc queries) 1 August 18th 06 11:40 AM
print button C A Excel Discussion (Misc queries) 1 June 25th 05 12:24 AM
overriding the print button and File/Print Pablo Excel Programming 3 September 11th 03 07:07 PM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"