kumar lama
Board Regular
- Joined
- May 20, 2014
- Messages
- 85
Hello All,
I am looking code for save as PDF in excel 2013,
i have one sheet (Summery) Calculation all data. other Sheet (Payslip). i am using Lookup formula to get data from Summary.
i am using Below code for printing all Payslip in one time. same like that i want Save AS code. Please help me. AJ1 Is lookup Value. and Ak1= Start Number, AK2= End Number(Or last Row of Payroll)
Public Sub PrintSlips()
Dim lStart As Long
Dim lEnd As Long
Dim l As Long
Dim rngSlipNumber As Range
Set rngSlipNumber = Sheet5.Range("AJ1")
lStart = Sheet5.Range("Ak1") ' indicates starting Sr num
lEnd = Sheet5.Range("Ak2") ' indicates ending Sr num
For l = lStart To lEnd
rngSlipNumber.Value2 = l
rngSlipNumber.Parent.PrintOut
Next l
End Sub
D8 Cell Has employees Name,
Also its better i can save file every name.
Thank in Advance
I am looking code for save as PDF in excel 2013,
i have one sheet (Summery) Calculation all data. other Sheet (Payslip). i am using Lookup formula to get data from Summary.
i am using Below code for printing all Payslip in one time. same like that i want Save AS code. Please help me. AJ1 Is lookup Value. and Ak1= Start Number, AK2= End Number(Or last Row of Payroll)
Public Sub PrintSlips()
Dim lStart As Long
Dim lEnd As Long
Dim l As Long
Dim rngSlipNumber As Range
Set rngSlipNumber = Sheet5.Range("AJ1")
lStart = Sheet5.Range("Ak1") ' indicates starting Sr num
lEnd = Sheet5.Range("Ak2") ' indicates ending Sr num
For l = lStart To lEnd
rngSlipNumber.Value2 = l
rngSlipNumber.Parent.PrintOut
Next l
End Sub
D8 Cell Has employees Name,
Also its better i can save file every name.
Thank in Advance