PDA

View Full Version : தரவு தாள் பயனர் படிவம் (எக்சல் யூசர் பார்ர்ம்) பயன்படுத்தி வருமான வரி கணக்கிடல்..



nambi
29-11-2010, 09:31 PM
தரவு தாள் ( எக்சல்) பயனர் படிவம் வடிவமைத்து எப்படி? வெவ்வேறு காலவரை கொண்ட கூட்டு வட்டிகளை கணக்கிட்டோமா? அதே போன்று இதற்கும் படிவம் வடிவமைத்து அதற்கான நிரல்களை இட்டு வரிகணிப்பானாக பயன்படுத்தாலும். ஏற்கனவே இந்த கணிப்பாணை தரவு தாளில் நாம் வடிவமைத்து சோதித்து இருப்பதால் இங்கு வடிவமைப்பது ஒன்றும் அவ்வளவு கடினமல்ல...மிகவும் எளிதானதே!

தரவு தாளில் வடிவமைக்கப்பட்டதை.....இங்கே சென்று காணலாம் (http://www.tamilmantram.com/vb/showpost.php?p=489611&postcount=1)

கீழ்கண்ட படத்தில் உள்ளது போல் பயனர் படிவம் வடிமைப்பு கருவியைக்கொண்டு விசுவல் பேசிக் தாளில் வடிவமைக்கவேண்டும்....

http://i837.photobucket.com/albums/zz297/nambitn/INCOMETAXUSERFORM.jpg


வடிவமைத்த பின் கால்குலேட் என்ற பொத்தானை அழுத்தி நிரல்களை நிரப்ப வேண்டும். நிரப்பிய பின் F5 பட்டனை அழுத்தி சோதனை செய்து பார்த்தபின்Alt Q கொடுத்து சேமித்து வெளியேற வேண்டும்......அனைத்தும் தரவுதாள் கூட்டு வட்டி அமைப்பிற்கு எந்த முறையினை கையாண்டோமோ? அதே முறையில் தான், இங்கேயும் வடிவங்களை அவரவர் விருப்பப்படியும், வடிவமைத்து வண்ணமிட்டு கொள்ளலாம்....

எப்படி.... என்று இங்கே சென்று காணலாம்... (http://www.tamilmantram.com/vb/showthread.php?t=24680)
.........................
இதன்பின் கால் குலேட் பொத்தான் அழுத்தினால் இதற்கான நிரல்........எழுத வேண்டிய தாள் இந்த
Private Sub cmdCalculate_Click()
End Sub

இருவரிகளுடன் வரும்...
........................
ஏற்கனவே எழுதப்பட்ட நிரல் கீழே கொடுக்கப்பட்டுள்ளது... இதை அப்படியே நகல் எடுத்து இந்த இரு வரிகளுக்கிடையே
Private Sub cmdCalculate_Click()
End Sub

ஒட்டினால் போதுமானாது....





Dim IncomeperAnnum As Currency
Dim Tax As Double, TaxRate As Double
Dim Cess As Double
Dim TaxableIncome As Double
Dim TotalTax As Double
Dim LICPolicies As Currency
Dim PostalSavings As Currency
Dim NSC As Currency
Dim MedicalInsurance As Currency
Dim PCInsurance As Currency
Dim EducationLoan As Currency
Dim Donation As Currency
Dim Cess2 As Double
Dim NetTax As Double
Dim ReducedTax As Double
Dim IncomeAfterSavings As Double
Dim ReducedTaxableIncome As Double
Dim ReducedTaxRate As Double

LICPolicies = CCur(txtLICPolicies.Text)
PostalSavings = CCur(txtPostalSavings.Text)
NSC = CCur(txtNSC.Text)
MedicalInsurance = CCur(txtMedicalInsurance.Text)
PCInsurance = CCur(txtPCInsurance.Text)
EducationLoan = CCur(txtEducationLoan.Text)
Donation = CCur(txtDonation.Text)

IncomeperAnnum = CCur(txtIncomeperAnnum.Text)

TaxRate = 0
If optMale.Value = True And (IncomeperAnnum > 160000) = True Then
TaxRate = 10
End If

If optMale.Value = True And (IncomeperAnnum > 500000) = True Then
TaxRate = 20
End If

If optMale.Value = True And (IncomeperAnnum > 800000) = True Then
TaxRate = 30

End If


If optFemale.Value = True And (IncomeperAnnum > 190000) = True Then
TaxRate = 10
End If
If optFemale.Value = True And (IncomeperAnnum > 500000) = True Then
TaxRate = 20
End If

If optFemale.Value = True And (IncomeperAnnum > 800000) = True Then
TaxRate = 30

End If


If optSeniorCitizen.Value = True And (IncomeperAnnum > 240000) = True Then
TaxRate = 10
End If
If optSeniorCitizen.Value = True And (IncomeperAnnum > 500000) = True Then
TaxRate = 20
End If

If optSeniorCitizen.Value = True And (IncomeperAnnum > 800000) = True Then
TaxRate = 30

End If

TaxableIncome = 0
If optMale.Value = True And (IncomeperAnnum > 160000) = True Then
TaxableIncome = IncomeperAnnum - 160000
End If
If optFemale.Value = True And (IncomeperAnnum > 190000) = True Then
TaxableIncome = IncomeperAnnum - 190000
End If
If optSeniorCitizen = True And (IncomeperAnnum > 240000) = True Then
TaxableIncome = IncomeperAnnum - 240000
End If

txtTaxRate = (TaxRate)
txtTaxableIncome = (TaxableIncome)
Tax = TaxRate * TaxableIncome / 100
Cess = Tax * 3 / 100
TotalTax = Cess + Tax


IncomeAfterSavings = 0
txtLICPolicies = (LICPolicies)
txtPostalSavings = (PostalSavings)
txtNSC = (NSC)
txtMedicalInsurance = (MedicalInsurance)
txtPCInsurance = (PCInsurance)
txtEducationLoan = (EducationLoan)
txtDonation = (Donation)




If optMale.Value = True And (IncomeperAnnum > 160000) = True Then
IncomeAfterSavings = (IncomeperAnnum) - (LICPolicies + PostalSavings + NSC + MedicalInsurance + PCInsurance + EducationLoan + Donation)

End If
If optFemale.Value = True And (IncomeperAnnum > 190000) = True Then
IncomeAfterSavings = (IncomeperAnnum) - (LICPolicies + PostalSavings + NSC + MedicalInsurance + PCInsurance + EducationLoan + Donation)
End If
If optSeniorCitizen = True And (IncomeperAnnum > 240000) = True Then
IncomeAfterSavings = (IncomeperAnnum) - (LICPolicies + PostalSavings + NSC + MedicalInsurance + PCInsurance + EducationLoan + Donation)

End If

ReducedTaxableIncome = 0
txtIncomeAfterSavings = (IncomeAfterSavings)
If optMale.Value = True And (IncomeAfterSavings > 160000) = True Then
ReducedTaxableIncome = IncomeAfterSavings - 160000
End If
If optFemale.Value = True And (IncomeAfterSavings > 190000) = True Then
ReducedTaxableIncome = IncomeAfterSavings - 190000
End If
If optSeniorCitizen = True And (IncomeAfterSavings > 240000) = True Then
ReducedTaxableIncome = IncomeAfterSavings - 240000
End If


ReducedTaxRate = 0
If optMale.Value = True And (IncomeAfterSavings > 160000) = True Then
ReducedTaxRate = 10
End If

If optMale.Value = True And (IncomeAfterSavings > 500000) = True Then
ReducedTaxRate = 20
End If

If optMale.Value = True And (IncomeAfterSavings > 800000) = True Then
ReducedTaxRate = 30

End If


If optFemale.Value = True And (IncomeAfterSavings > 190000) = True Then
ReducedTaxRate = 10
End If
If optFemale.Value = True And (IncomeAfterSavings > 500000) = True Then
ReducedTaxRate = 20
End If

If optFemale.Value = True And (IncomeAfterSavings > 800000) = True Then
ReducedTaxRate = 30

End If


If optSeniorCitizen.Value = True And (IncomeAfterSavings > 240000) = True Then
ReducedTaxRate = 10
End If
If optSeniorCitizen.Value = True And (IncomeAfterSavings > 500000) = True Then
ReducedTaxRate = 20
End If

If optSeniorCitizen.Value = True And (IncomeAfterSavings > 800000) = True Then
ReducedTaxRate = 30

End If
txtReducedTaxRate = (ReducedTaxRate)


ReducedTax = 0


txtReducedTax = (ReducedTax)
txtReducedTaxableIncome = (ReducedTaxableIncome)
ReducedTax = ReducedTaxableIncome * ReducedTaxRate / 100


txtReducedTax = (ReducedTax)

Cess2 = ReducedTax * 3 / 100
txtCess2 = (Cess2)

NetTax = ReducedTax + Cess2


txtTaxableIncome = FormatCurrency(TaxableIncome)
txtTax.Text = FormatCurrency(Tax)
txtCess.Text = FormatCurrency(Cess)
txtTotalTax = FormatCurrency(TotalTax)
txtIncomeAfterSavings = FormatCurrency(IncomeAfterSavings)
txtReducedTaxableIncome = FormatCurrency(ReducedTaxableIncome)
txtReducedTax = FormatCurrency(ReducedTax)
txtCess2 = FormatCurrency(Cess2)
txtNetTax = FormatCurrency(NetTax)




அதன் பின் F5 அழுத்தி ஒரு முறை சோதித்துப் பார்க்கலாம் அது சரியாக அமைக்கப்பட்டுள்ளதா? என்று? பெரும்பாலும் பிழை என்று வந்தால் எழுத்துப் பிழைகளாகத்தான் வரும்...அந்த பிழையை மேக்ரோ ரன் கட்டளை கொடுக்கும் பொழுது அதாவது F5 கொடுக்கும்பொழுது நிரல்களை சோதித்து எந்த இடத்தில் பிழை மறைந்துள்ளதோ அதை மறைமுகமாக சுட்டிக்காட்டும்...அதாவது
(டெக்ஸ் பாக்ஸ்) உரைப்பெட்டிக்கான பெயரும் அதை நிரலில் நிரலில் பயன்படுத்திய பெயரும் ஒன்று போல் இல்லாவிட்டாலும் இந்த பிழை வரும்..............

இந்த சோதனை முடிந்தபின்...

குளோஸ் பொத்தானுக்கான நிரல்.........குளோஸ் பொத்தானை அழுத்தியவுடன் வரும் கீழ்க்கண்ட வரிகளுக்கிடையில்
Private Sub cmdClose_Click()
End Sub
இதை நகல் எடுத்து ஒட்டவும்.......


Unload Me


பின்பு Alt Q கொடுத்து விசுவல் பேசிக்கில் இருந்து வெளியேறி....

தரவுதாளில் இந்த பயனர் படிவம் திற்ப்பதற்கான கட்டளை பொத்தானை வடிவமைத்து (எக்சல் கருவிப்பெட்டி கொண்டு வடிவமைக்கவேண்டும்) அது எப்படி என்று கூட்டுவட்டி கணக்கீடு பயனர் படிவம் வடிமைப்பிலேயே கொடுக்கப்பட்டுள்ளது....அதை அப்படியே பின்பற்றி இங்கேயும் வடிமைத்துக்கொள்ளலாம்...

http://i837.photobucket.com/albums/zz297/nambitn/COMMANDBUTTONFORITUSERFORMnew.jpg
மேற்படி வடிவமைத்த பொத்தானுக்கான நிரல்...

அந்த பொத்தானை அழுத்தியவுடன்....வரும் தாளில் இருவரிகளுக்கிடேயே இதை நிரப்ப வேண்டும்...
Private Sub CommandButton1_Click()

End Sub


UserForm1.Show


http://i837.photobucket.com/albums/zz297/nambitn/INCOMETAXUSERFORMCALCULATION.jpg


இப்போது முழுப்பணியும் முடிந்து விட்டது...இப்பொழுது மேலே படத்தில் குறிப்பிட்டது போல் உங்கள் ஆண்டு வருமானம் மற்றும் எந்தெந்த வகையில் சேமிப்புகள் உள்ளதோ அதை மட்டும் ஆண்டுக்கு செலுத்தும் அல்லது செலித்திய தொகையை குறிப்பிட்டு கால்குலேட் என்ற பொத்தானை அழுத்தினால் நடப்பு ஆண்டு செலுத்தவேண்டிய நிகர வரி மதிப்பு கிடைக்கும்.

இதை அவரவர் சேமிப்புத்திட்டங்களுக்கு ஏற்றவாறு இன்னும் கூடுதலாக இணைப்புகளை உருவாக்கி அதற்கான நிரல்களை இந்த நிரல்களுக்கிடையே உள்ளிட்டு பயன்டுத்தலாம்....அப்படி உருவாக்கியவற்றை இங்கே பகிர்ந்து கொள்ளலாம்...

நன்றி!