Hello I have two excels one is "Ueberstundenrapport Namensliste" and the second is "Ueberstundenrapport"
In first I have one list and for each one i need to print one "Ueberstundenrapport" that is function
But when I want to print just for one guy I want to insert the his Nr in H13 and to print just that.
This is code that is printing just one guy but always same.
Formula:
Sub SerienDruckSpesenEinzeln()
Workbooks.Open Filename:="C:\Users\Dell\Desktop\Hydroplant\Ueberstundenrapport.xltx" _
, Editable:=True
Windows("Ueberstundenrapport.xltx").Activate
Range("B2:D2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP([Ueberstundenrapport.xltx]Rapport!R2C9,'[Ueberstundenrapport Namensliste.XLSM]Namensliste'!R1C1:R38C4,2)"
Range("G2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP([Ueberstundenrapport.xltx]Rapport!R2C9,'[Ueberstundenrapport Namensliste.XLSM]Namensliste'!R1C1:R38C4,3)"
Range("H2").Select
ActiveCell.FormulaR1C1 = "='[Ueberstundenrapport Namensliste.XLSM]Namensliste'!R6C7"
Range("I2").Select
ActiveCell.FormulaR1C1 = "='[Ueberstundenrapport Namensliste.XLSM]Namensliste'!R13C8"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Windows("Ueberstundenrapport.xltx").Close (False)
End Sub
Bookmarks