HomeAdvance MS ExcelExcel VBA Auto GST and Discount in Data Entry beginners | Excel...

Excel VBA Auto GST and Discount in Data Entry beginners | Excel VBA Project by Pradip VedantSri

5/5 - (1 vote)

Excel VBA Auto GST and Discount in Data Entry beginners | Excel VBA Project by Pradip VedantSri

‘Yah Entry Button ka Code hai
Private Sub CommandButton1_Click()
Dim x As Long
Dim y As Worksheet
Set y = Sheet1
x = y.Range(“A” & Rows.Count).End(xlUp).Row
With y
.Cells(x + 1, “A”).Value = TextBox1.Text
.Cells(x + 1, “B”).Value = TextBox2.Text
.Cells(x + 1, “C”).Value = TextBox3.Text
.Cells(x + 1, “D”).Value = TextBox4.Text
.Cells(x + 1, “E”).Value = TextBox5.Text
.Cells(x + 1, “F”).Value = TextBox6.Text
.Cells(x + 1, “G”).Value = TextBox7.Text
.Cells(x + 1, “H”).Value = TextBox8.Text
.Cells(x + 1, “I”).Value = TextBox9.Text
.Cells(x + 1, “J”).Value = TextBox10.Text
.Cells(x + 1, “K”).Value = TextBox11.Text
End With
On Error Resume Next
Unload Me
UserForm1.Show
End Sub
‘Yah Textbox Sutotal ka code hai
Private Sub TextBox10_Change()
Call Module2.Calc
End Sub

‘yah Rate Textbox ka code hai
Private Sub TextBox5_Change()
Dim a As Double
a = 0
If Len(TextBox4.Value) > 0 Then a = TextBox5.Value * TextBox4.Value
TextBox10 = a
End Sub
‘yah GST Textbox ka Code hai
Private Sub TextBox6_Change()
Dim a As Double
a = 0
If Len(TextBox6.Value) > 0 Then a = TextBox10.Value / 100 * TextBox6.Value
TextBox7 = a
End Sub
‘yah GST amt Textbox code hai
Private Sub TextBox7_Change()
Call Module2.Calc
End Sub

‘yah Discount textbox ka code hai
Private Sub TextBox8_Change()
Dim a As Double
a = 0
If Len(TextBox8.Value) > 0 Then a = TextBox10.Value / 100 * TextBox8.Value
TextBox9 = a
End Sub
‘yah dis amt ka code hai
Private Sub TextBox9_Change()
Call Module2.Calc
End Sub

‘yah automatic Sr No aur Date ka Code hai
Private Sub UserForm_Initialize()
TextBox1 = Application.WorksheetFunction.Max(Sheet1.Range(“A2:A100000”)) + 1001
TextBox2.Text = Format(Now(), “dd mmm, yy”)
End Sub


‘Module1 ka code hai Userform1 ko show Krne ke liye
Sub Sheet1_SmileyFace1_Click()
UserForm1.Show
End Sub


Module2 ka code hai Dis Amt, GST Amt aur SubTotal ke liye
Sub Calc()
Dim a As Double
a = 0
If Len(UserForm1.TextBox7.Value) > 0 Then a = a + UserForm1.TextBox7.Value
If Len(UserForm1.TextBox9.Value) > 0 Then a = a – UserForm1.TextBox9.Value
If Len(UserForm1.TextBox10.Value) > 0 Then a = a + UserForm1.TextBox10.Value
UserForm1.TextBox11 = a
End Sub

To Create This Project Watch this Video

VedantSri Sessional Reward Ceremony Toppers Students Image
VedantSri Sessional Reward Ceremony Toppers Students
[td_block_social_counter facebook="VedantSriOfficial/" manual_count_facebook="3600" twitter="vedantsrioffice" manual_count_twitter="456" manual_count_youtube="97000" instagram="vedantsriwelfare/" manual_count_instagram="12900" pinterest="vedantsri0/" manual_count_pinterest="20" youtube="channel/UCJa8JQTm3MXullazMKygXGA"]
Call Now Button