CREATE CASH LEDGER IN EXCEL VBA ।। CASH MANAGEMENT SYSTEM IN EXCEL VBA


CREATE CASH LEDGER IN EXCEL VBA ।। CASH MANAGEMENT SYSTEM IN EXCEL VBA

Private Sub paid_dino_Click()
' NOTE_CHECKER
Dim Csh As Worksheet
Set Csh = Sheets("CASH")
With Me
.Label17 = Csh.Range("T4") + .TextBox2 - .TextBox11
.Label18 = Csh.Range("T5") + .TextBox3 - .TextBox12
.Label19 = Csh.Range("T6") + .TextBox4 - .TextBox13
.Label20 = Csh.Range("T7") + .TextBox5 - .TextBox14
.Label21 = Csh.Range("T8") + .TextBox6 - .TextBox15
.Label22 = Csh.Range("T9") + .TextBox7 - .TextBox16
.Label23 = Csh.Range("T10") + .TextBox8 - .TextBox17
.Label24 = Csh.Range("T11") + .TextBox9 - .TextBox18
.Label25 = Csh.Range("T12") + .TextBox10 - .TextBox19

    If .Label17 < 0 Then
    MsgBox "PLEASE CHECK 2000 NOTE"
        Exit Sub
    End If
    
    If .Label18 < 0 Then
    MsgBox "PLEASE CHECK 500 NOTE"
        Exit Sub
    End If
    
    If .Label19 < 0 Then
    MsgBox "PLEASE CHECK 200 NOTE"
        Exit Sub
    End If
    
    If .Label20 < 0 Then
    MsgBox "PLEASE CHECK 100 NOTE"
        Exit Sub
    End If
    
    If .Label21 < 0 Then
    MsgBox "PLEASE CHECK 50 NOTE"
        Exit Sub
    End If

    If .Label22 < 0 Then
    MsgBox "PLEASE CHECK 20 NOTE"
        Exit Sub
    End If

    If .Label23 < 0 Then
    MsgBox "PLEASE CHECK 10 NOTE"
        Exit Sub
    End If

    If .Label24 < 0 Then
    MsgBox "PLEASE CHECK 5 NOTE"
        Exit Sub
    End If

    If .Label25 < 0 Then
    MsgBox "PLEASE CHECK coin NOTE"
        Exit Sub
    End If

End With
'.......................................................

If Me.TextBox31.Value <> Me.TextBox20 Then
MsgBox "PLEASE CHECK AMOUNT"
Exit Sub
End If

If Me.TextBox1 = Empty Or Me.TextBox30 = Empty Then
MsgBox "RECEIVED FROM AND REMARK FEILD CAN'T BE BLANK"
Exit Sub
End If

Dim SH As Worksheet
Set SH = Sheets("HOME")
Dim i As Long
i = SH.Range("B" & Rows.Count).End(xlUp).Row + 1
SH.Unprotect "cash123"
SH.Cells(i, 1) = i - 3
SH.Cells(i, 2) = Format(Date, "dd-mmm-yy")
SH.Cells(i, 3) = Me.TextBox1.Value
SH.Cells(i, 5) = Me.TextBox20.Value
SH.Cells(i, 6) = Me.TextBox30.Value
Dim X As Integer
For X = 2 To 20
SH.Cells(i, X + 5) = Me("TextBox" & X).Value
Next X
SH.Protect "cash123"
Unload Me
End Sub

Private Sub TextBox1_Change()
Me.TextBox1 = UCase(Me.TextBox1)

End Sub

Private Sub TextBox2_Change()
If Me.TextBox2 = "" Then
Me.TextBox2.Value = "0"
End If
Me.TextBox21.Value = "2000" * Me.TextBox11.Value - "2000" * Me.TextBox2.Value
End Sub
Private Sub TextBox11_Change()
If Me.TextBox11 = "" Then
Me.TextBox11.Value = "0"
End If
Me.TextBox21.Value = "2000" * Me.TextBox11.Value - "2000" * Me.TextBox2.Value
End Sub


Private Sub TextBox3_Change()
If Me.TextBox3 = "" Then
Me.TextBox3.Value = "0"
End If
Me.TextBox22.Value = "500" * Me.TextBox12.Value - "500" * Me.TextBox3.Value

End Sub
Private Sub TextBox12_Change()
If Me.TextBox12 = "" Then
Me.TextBox12.Value = "0"
End If
Me.TextBox22.Value = "500" * Me.TextBox12.Value - "500" * Me.TextBox3.Value
End Sub

Private Sub TextBox30_Change()
Me.TextBox30 = UCase(Me.TextBox30)

End Sub

Private Sub TextBox4_Change()
If Me.TextBox4 = "" Then
Me.TextBox4.Value = "0"
End If
Me.TextBox23.Value = "200" * Me.TextBox13.Value - "200" * Me.TextBox4.Value

End Sub

Private Sub TextBox13_Change()
If Me.TextBox13 = "" Then
Me.TextBox13.Value = "0"
End If
Me.TextBox23.Value = "200" * Me.TextBox13.Value - "200" * Me.TextBox4.Value

End Sub
Private Sub TextBox5_Change()
If Me.TextBox5 = "" Then
Me.TextBox5.Value = "0"
End If
Me.TextBox24.Value = "100" * Me.TextBox14.Value - "100" * Me.TextBox5.Value

End Sub
Private Sub TextBox14_Change()
If Me.TextBox14 = "" Then
Me.TextBox14.Value = "0"
End If
Me.TextBox24.Value = "100" * Me.TextBox14.Value - "100" * Me.TextBox5.Value

End Sub
Private Sub TextBox6_Change()
If Me.TextBox6 = "" Then
Me.TextBox6.Value = "0"
End If
Me.TextBox25.Value = "50" * Me.TextBox15.Value - "50" * Me.TextBox6.Value
End Sub
Private Sub TextBox15_Change()
If Me.TextBox15 = "" Then
Me.TextBox15.Value = "0"
End If
Me.TextBox25.Value = "50" * Me.TextBox15.Value - "50" * Me.TextBox6.Value
End Sub
Private Sub TextBox7_Change()
If Me.TextBox7 = "" Then
Me.TextBox7.Value = "0"
End If
Me.TextBox26.Value = "20" * Me.TextBox16.Value - "20" * Me.TextBox7.Value
End Sub
Private Sub TextBox16_Change()
If Me.TextBox16 = "" Then
Me.TextBox16.Value = "0"
End If
Me.TextBox26.Value = "20" * Me.TextBox16.Value - "20" * Me.TextBox7.Value

End Sub
Private Sub TextBox8_Change()
If Me.TextBox8 = "" Then
Me.TextBox8.Value = "0"
End If
Me.TextBox27.Value = "10" * Me.TextBox17.Value - "10" * Me.TextBox8.Value

End Sub
Private Sub TextBox17_Change()
If Me.TextBox17 = "" Then
Me.TextBox17.Value = "0"
End If
Me.TextBox27.Value = "10" * Me.TextBox17.Value - "10" * Me.TextBox8.Value

End Sub
Private Sub TextBox9_Change()
If Me.TextBox9 = "" Then
Me.TextBox9.Value = "0"
End If
Me.TextBox28.Value = "5" * Me.TextBox18.Value - "5" * Me.TextBox9.Value
End Sub
Private Sub TextBox18_Change()
If Me.TextBox18 = "" Then
Me.TextBox18.Value = "0"
End If
Me.TextBox28.Value = "5" * Me.TextBox18.Value - "5" * Me.TextBox9.Value
End Sub
Private Sub TextBox10_Change()
If Me.TextBox10 = "" Then
Me.TextBox10.Value = "0"
End If
Me.TextBox29.Value = Me.TextBox19.Value - Me.TextBox10.Value

End Sub
Private Sub TextBox19_Change()
If Me.TextBox19 = "" Then
Me.TextBox19.Value = "0"
End If
Me.TextBox29.Value = Me.TextBox19.Value - Me.TextBox10.Value

End Sub

''.................. For Total Value .......................
Private Sub TextBox21_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox22_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox23_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox24_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox25_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox26_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub


Private Sub TextBox27_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox28_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox29_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

'------------------------------- NOW RECEIVED DINO COMMAND BUTTON-------------


Private Sub CommandButton1_Click()
' NOTE_CHECKER
Dim Csh As Worksheet
Set Csh = Sheets("CASH")
With Me
.Label17 = Csh.Range("T4") + .TextBox2 - .TextBox11
.Label18 = Csh.Range("T5") + .TextBox3 - .TextBox12
.Label19 = Csh.Range("T6") + .TextBox4 - .TextBox13
.Label20 = Csh.Range("T7") + .TextBox5 - .TextBox14
.Label21 = Csh.Range("T8") + .TextBox6 - .TextBox15
.Label22 = Csh.Range("T9") + .TextBox7 - .TextBox16
.Label23 = Csh.Range("T10") + .TextBox8 - .TextBox17
.Label24 = Csh.Range("T11") + .TextBox9 - .TextBox18
.Label25 = Csh.Range("T12") + .TextBox10 - .TextBox19

    If .Label17 < 0 Then
    MsgBox "PLEASE CHECK 2000 NOTE"
        Exit Sub
    End If
    
    If .Label18 < 0 Then
    MsgBox "PLEASE CHECK 500 NOTE"
        Exit Sub
    End If
    
    If .Label19 < 0 Then
    MsgBox "PLEASE CHECK 200 NOTE"
        Exit Sub
    End If
    
    If .Label20 < 0 Then
    MsgBox "PLEASE CHECK 100 NOTE"
        Exit Sub
    End If
    
    If .Label21 < 0 Then
    MsgBox "PLEASE CHECK 50 NOTE"
        Exit Sub
    End If

    If .Label22 < 0 Then
    MsgBox "PLEASE CHECK 20 NOTE"
        Exit Sub
    End If

    If .Label23 < 0 Then
    MsgBox "PLEASE CHECK 10 NOTE"
        Exit Sub
    End If

    If .Label24 < 0 Then
    MsgBox "PLEASE CHECK 5 NOTE"
        Exit Sub
    End If

    If .Label25 < 0 Then
    MsgBox "PLEASE CHECK coin NOTE"
        Exit Sub
    End If

End With

If Me.TextBox31.Value <> Me.TextBox20 Then
MsgBox "PLEASE CHECK AMOUNT"
Exit Sub
End If

If Me.TextBox1 = Empty Or Me.TextBox30 = Empty Then
MsgBox "RECEIVED FROM AND REMARK FEILD CAN'T BE BLANK"
Exit Sub
End If

Dim SH As Worksheet
Set SH = Sheets("HOME")
Dim i As Long
i = SH.Range("B" & Rows.Count).End(xlUp).Row + 1
SH.Unprotect "cash123"

SH.Cells(i, 1) = i
SH.Cells(i, 2) = Format(Date, "dd-mmm-yy")
SH.Cells(i, 3) = Me.TextBox1.Value
SH.Cells(i, 4) = Me.TextBox20.Value
SH.Cells(i, 6) = Me.TextBox30.Value
Dim X As Integer
For X = 2 To 20
SH.Cells(i, X + 5) = Me("TextBox" & X).Value
Next X
SH.Protect "cash123"
Unload Me
End Sub

Private Sub CommandButton2_Click()
UserForm1.Show

End Sub

Private Sub CommandButton3_Click()
Unload Me
End Sub

Private Sub TextBox1_Change()
Me.TextBox1 = UCase(Me.TextBox1)

End Sub

Private Sub TextBox2_Change()
If Me.TextBox2 = "" Then
Me.TextBox2.Value = "0"
End If
Me.TextBox21.Value = "2000" * Me.TextBox2.Value - "2000" * Me.TextBox11.Value
End Sub
Private Sub TextBox11_Change()
If Me.TextBox11 = "" Then
Me.TextBox11.Value = "0"
End If
Me.TextBox21.Value = "2000" * Me.TextBox2.Value - "2000" * Me.TextBox11.Value
End Sub


Private Sub TextBox3_Change()
If Me.TextBox3 = "" Then
Me.TextBox3.Value = "0"
End If
Me.TextBox22.Value = "500" * Me.TextBox3.Value - "500" * Me.TextBox12.Value

End Sub
Private Sub TextBox12_Change()
If Me.TextBox12 = "" Then
Me.TextBox12.Value = "0"
End If
Me.TextBox22.Value = "500" * Me.TextBox3.Value - "500" * Me.TextBox12.Value
End Sub

Private Sub TextBox30_Change()
Me.TextBox30 = UCase(Me.TextBox30)

End Sub

Private Sub TextBox4_Change()
If Me.TextBox4 = "" Then
Me.TextBox4.Value = "0"
End If
Me.TextBox23.Value = "200" * Me.TextBox4.Value - "200" * Me.TextBox13.Value

End Sub

Private Sub TextBox13_Change()
If Me.TextBox13 = "" Then
Me.TextBox13.Value = "0"
End If
Me.TextBox23.Value = "200" * Me.TextBox4.Value - "200" * Me.TextBox13.Value

End Sub
Private Sub TextBox5_Change()
If Me.TextBox5 = "" Then
Me.TextBox5.Value = "0"
End If
Me.TextBox24.Value = "100" * Me.TextBox5.Value - "100" * Me.TextBox14.Value

End Sub
Private Sub TextBox14_Change()
If Me.TextBox14 = "" Then
Me.TextBox14.Value = "0"
End If
Me.TextBox24.Value = "100" * Me.TextBox5.Value - "100" * Me.TextBox14.Value

End Sub
Private Sub TextBox6_Change()
If Me.TextBox6 = "" Then
Me.TextBox6.Value = "0"
End If
Me.TextBox25.Value = "50" * Me.TextBox6.Value - "50" * Me.TextBox15.Value
End Sub
Private Sub TextBox15_Change()
If Me.TextBox15 = "" Then
Me.TextBox15.Value = "0"
End If
Me.TextBox25.Value = "50" * Me.TextBox6.Value - "50" * Me.TextBox15.Value
End Sub
Private Sub TextBox7_Change()
If Me.TextBox7 = "" Then
Me.TextBox7.Value = "0"
End If
Me.TextBox26.Value = "20" * Me.TextBox7.Value - "20" * Me.TextBox16.Value
End Sub
Private Sub TextBox16_Change()
If Me.TextBox16 = "" Then
Me.TextBox16.Value = "0"
End If
Me.TextBox26.Value = "20" * Me.TextBox7.Value - "20" * Me.TextBox16.Value

End Sub
Private Sub TextBox8_Change()
If Me.TextBox8 = "" Then
Me.TextBox8.Value = "0"
End If
Me.TextBox27.Value = "10" * Me.TextBox8.Value - "10" * Me.TextBox17.Value

End Sub
Private Sub TextBox17_Change()
If Me.TextBox17 = "" Then
Me.TextBox17.Value = "0"
End If
Me.TextBox27.Value = "10" * Me.TextBox8.Value - "10" * Me.TextBox17.Value

End Sub
Private Sub TextBox9_Change()
If Me.TextBox9 = "" Then
Me.TextBox9.Value = "0"
End If
Me.TextBox28.Value = "5" * Me.TextBox9.Value - "5" * Me.TextBox18.Value
End Sub
Private Sub TextBox18_Change()
If Me.TextBox18 = "" Then
Me.TextBox18.Value = "0"
End If
Me.TextBox28.Value = "5" * Me.TextBox9.Value - "5" * Me.TextBox18.Value
End Sub
Private Sub TextBox10_Change()
If Me.TextBox10 = "" Then
Me.TextBox10.Value = "0"
End If
Me.TextBox29.Value = Me.TextBox10.Value - Me.TextBox19.Value

End Sub
Private Sub TextBox19_Change()
If Me.TextBox19 = "" Then
Me.TextBox19.Value = "0"
End If
Me.TextBox29.Value = Me.TextBox10.Value - Me.TextBox19.Value

End Sub

''.................. For Total Value .......................
Private Sub TextBox21_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox22_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox23_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox24_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox25_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox26_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub


Private Sub TextBox27_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox28_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

Private Sub TextBox29_Change()
Me.TextBox20.Value = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox24.Text) _
+ Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) + Val(TextBox28.Text) _
 + Val(TextBox29.Text)

End Sub

'----------------------------------FOR SEARCH IN LISTBOX--------------------------------------
Option Explicit


Private Sub CommandButton1_Click()
'Everytime When you click this buttom then clear _
the ListBox first
Me.ListBox1.Clear
' Codes for Headers of ListBox
Me.ListBox1.AddItem "SL NO"
Me.ListBox1.List(0, 1) = "DATE"
Me.ListBox1.List(0, 2) = "PARTICULARS"
Me.ListBox1.List(0, 3) = "RECEIVED"
Me.ListBox1.List(0, 4) = "PAYMENT"
Me.ListBox1.List(0, 5) = "REMARKS"
Me.ListBox1.Selected(0) = True

Dim SH As Worksheet
Set SH = Sheets("HOME")
Dim X, a, b As Integer

'Count row number upto last non-empty row
Dim i As Long
For i = 4 To SH.Range("A1000000").End(xlUp).Row
If Me.ComboBox1 = "Date" Then b = 2
If Me.ComboBox1 = "Particulars" Then b = 3
If Me.ComboBox1 = "Remarks" Then b = 6

For X = 1 To Len(SH.Cells(i, b))
a = Me.TextBox1.TextLength
'searching keywords and populate listbox
'use mid function i.e mid(text, start num, textlength)

If UCase(Mid(SH.Cells(i, b), X, a)) = Me.TextBox1 And Me.TextBox1 <> "" Then
'now add item on listbox based on above keywords
With ListBox1
.AddItem SH.Cells(i, 1)
.List(.ListCount - 1, 1) = SH.Cells(i, 2)
.List(.ListCount - 1, 2) = SH.Cells(i, 3)
.List(.ListCount - 1, 3) = SH.Cells(i, 4)
.List(.ListCount - 1, 4) = SH.Cells(i, 5)
.List(.ListCount - 1, 5) = SH.Cells(i, 6)
End With
End If
Next X
Next i

'If Data not found then show msgbox
If Me.ListBox1.ListCount = 0 Then
MsgBox "DATA NOT FOUND"
End If

' sum of Column of ListBox
Dim rSum, mSum As Double
rSum = 0
mSum = 0
On Error Resume Next
With ListBox1
Dim r As Long
For r = 0 To .ListCount - 1
rSum = rSum + .List(r, 3)
mSum = mSum + .List(r, 4)
Next r
End With
Me.Label3 = rSum
Me.Label4 = mSum

End Sub

Private Sub TextBox1_AfterUpdate()
On Error Resume Next
'textbox1 date format depending on ComboBox1's Value

If Me.ComboBox1.Value = "Date" Then
Me.TextBox1 = Format(Me.TextBox1, "dd-mmm-yy")
End If

'textbox1 text format
Me.TextBox1 = UCase(Me.TextBox1)

End Sub

Private Sub TextBox1_Change()
'textbox1 text format
Me.TextBox1 = UCase(Me.TextBox1)

End Sub

Private Sub UserForm_Initialize()
'addItem on ComboBox1 when userform is displayed automatically
Me.ComboBox1.AddItem "Date"
Me.ComboBox1.AddItem "Particulars"
Me.ComboBox1.AddItem "Remarks"

End Sub

6 comments:

  1. good job....

    please send me the excel file...

    Thanks in advance

    ReplyDelete
    Replies
    1. https://drive.google.com/uc?export=download&id=19p0_XwD1awEEVsir2SYTI5y9xMFiCAhx

      Delete
  2. please provide sheet password to delete opening balance

    ReplyDelete