View Full Version : Solved: Select, Insert & Print Macro
klutz
05-16-2010, 07:01 PM
Hello all,
I have a worksheet that works sort of like a template.
On column "T" I have data which when I insert one of that data individually on "A1" it changes the data output on the complete template. Once that takes place I select print and print out that template.
Is there a macro that can select the first dataset on column "T" inserted on "A1" then print template and then start the loop again until all are printed? :think:
Can someone help, Thanks:help
Da Klutz---
klutz
05-18-2010, 07:08 AM
Any takers on this please....
lynnnow
05-18-2010, 07:17 AM
Will this do?
Sub printpicker()
Range("T7").Activate
Do While Not IsEmpty(ActiveCell.Value)
Range("A1").Value = ActiveCell.Value
Range("PrintForm").PrintOut
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
You will need to select the range A3 to M40 and name it as PrintForm before you run the macro.
HTH
Lincoln
klutz
05-18-2010, 07:29 AM
Will this do?
Sub printpicker()
Range("T7").Activate
Do While Not IsEmpty(ActiveCell.Value)
Range("A1").Value = ActiveCell.Value
Range("PrintForm").PrintOut
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
You will need to select the range A3 to M40 and name it as PrintForm before you run the macro.
HTH
Lincoln
Thanks Lynnow, it sure does help.
One question, can the looping stop once the data in the column has a zero value?
Thanks again
lynnnow
05-18-2010, 07:37 AM
How about this...
Sub printpicker()
Range("T7").Activate
Do While Not IsEmpty(ActiveCell.Value)
If ActiveCell.Value = 0 Then Exit Sub
Range("A1").Value = ActiveCell.Value
Range("PrintForm").PrintOut
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
This will quit the sub at the first instance it finds a 0 in the Column T
HTH
Lincoln
klutz
05-18-2010, 07:44 AM
Thank You much Lynnnow, it works as intended....Thanks friend...
lynnnow
05-18-2010, 07:45 AM
Always welcome
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.