এক্সেল ভিবিএ ইউজারফর্মে ডিজিটাল ফোন বুক – Digital Phone Book in excel vba Userform

এক্সেল ভিবিএ ইউজারফর্মে ডিজিটাল ফোন বুক ব্যবহার করে আপনি আপনার ফোন নম্বর এবং যোগাযোগের সাথে সংযুক্ত করতে পারেন। এই পৃষ্ঠাটিতে আপনি কীভাবে এক্সেল ভিবিএ ইউজারফর্মে ডিজিটাল ফোন বুক তৈরি করতে পারেন সেই বিস্তারিত জানতে পারবেন।

এক্সেল ভিবিএ ইউজারফর্মে ডিজিটাল অ্যাড্রেস বুক, এই ভিবিএ অ্যাড্রেস বুক ইউজারফর্মের দিয়ে ডাটা অ্যাড করতে পারবেন। ডাটা অ্যাড করার পর টেক্সট কালার এবং ব্যাকরাউন্ড কালার চেঞ্জ করেত পারবেন ম্যাক্রো কোড দিয়ে।

 

১:- ডাটা ডিলেট করতে পারবেন।

২:- ডাটা এডিট করতে পারবেন 

৩:- শিট থেকে ডাটা সার্চ করেত পারবেন।

৪:- প্রতিবার নতুন রেকর্ড অ্যাড করা হওয়ার পর,  রেকর্ডের জন্য আইডি (ID) নাম্বার স্বয়ংক্রিয়ভাবে (automatically)  কলাম A-তেঅ্যাড হয়ে যাবে। কোনো রেকর্ড ডিলেট করা হলে আইডি (ID) নম্বরগুলি স্বয়ংক্রিয়ভাবে পুনরায় তৈরি হবে।

 ৫:- বাটন ব্যবহার করে লিস্টবক্স  ফিলাপ এবং খালি করতে পারবেন। 

৬:- লিস্টবক্স স্পিন বাটন দিয়ে স্ক্রোল করা যেতে পারে (স্পিন বাটন দিয়ে লিস্টবক্স আইটেমগুলির মধ্যে রিমোভ করতে পারবেন)। 

Codes of “Save” button : 

Private Sub CommandButton1_Click()
Dim new_reg As Long
If TextBox1.Text = Empty Or TextBox3.Text = Empty Then
MsgBox "Incomplete Data", vbCritical, ""
TextBox1.SetFocus
Exit Sub
End If

For new_reg = 2 To Cells(Rows.Count, 2).End(xlUp).Row ‘It is checked whether the record already exists, if there is the record, a warning is given.
If Cells(new_reg, “B”) = TextBox1 Then
MsgBox “This name is already registered !”, vbInformation, “”
TextBox1 = Empty
Exit Sub: End If: Next

sonsat = Sheets(“Main”).Cells(Rows.Count, “A”).End(xlUp).Row + 1
Cells(sonsat, 1) = sonsat – 1
Cells(sonsat, 2) = TextBox1
Cells(sonsat, 3) = TextBox2
Cells(sonsat, 4) = TextBox3
Cells(sonsat, 5) = TextBox4
Cells(sonsat, 6) = TextBox5
Cells(sonsat, 7) = TextBox6
Cells(sonsat, 8) = TextBox7
Cells(sonsat, 9) = TextBox8
Range(“A” & sonsat & “:I” & sonsat).Font.ColorIndex = 11 ‘The font color of the record is set.

MsgBox “Registration is successful”, vbInformation
Range(“A” & sonsat & “:I” & sonsat).Interior.ColorIndex = 25 ‘The background color of the record is set.
Call sort_id
Call text_boxes_clear
End Sub

Private Sub CommandButton7_Click() 'Fill All Records To Listbox button
sat = Cells(Rows.Count, "A").End(xlUp).Row
ListBox1.List = Sheets("Main").Range("B2:I" & sat).Value
With ListBox1
        For i = 1 To 8
            deg = deg & CLng(Columns(i + 1).Width) & ";"
        Next i
        .ColumnWidths = deg
End With
ListBox1.ColumnCount = 8
...

When a value is entered into the related textbox (TextBox9) to search the listbox, the codes in the TextBox9_Change method are triggered.
Search is performed in column A that contained the names and the results are listed on the listbox : 

Private Sub TextBox9_Change()
Dim sat, s As Long
Dim deg, deg1, deg2, wanted As String
Application.ScreenUpdating = False
CommandButton1.Enabled = False
ListBox1.Clear

deg2 = TextBox9.Value
If OptionButton1.Value = True Then
wanted = UCase(deg2) & “*”
End If
If OptionButton2.Value = True Then
wanted = “*” & UCase(deg2) & “*”
End If

For sat = 2 To Sheets(“Main”).Cells(Rows.Count, “B”).End(xlUp).Row
Set deg1 = Cells(sat, “B”)
If UCase(deg1) Like wanted Then

ListBox1.ColumnCount = 8
ListBox1.AddItem
ListBox1.List(s, 0) = Cells(sat, “B”)
ListBox1.List(s, 1) = Cells(sat, “C”)
ListBox1.List(s, 2) = Cells(sat, “D”)
ListBox1.List(s, 3) = Cells(sat, “E”)
ListBox1.List(s, 4) = Cells(sat, “F”)
ListBox1.List(s, 5) = Cells(sat, “G”)
ListBox1.List(s, 6) = Cells(sat, “H”)
ListBox1.List(s, 7) = Cells(sat, “I”)
s = s + 1
With ListBox1
For i = 1 To 8
deg = deg & CLng(Columns(i + 1).Width) & “;”
Next i
.ColumnWidths = deg
End With
End If: Next

End Sub 

আমাদের সম্পর্কে জানতে এবং বিভিন্ন টিউটোরিয়াল পেতে লাইক ও সাবস্ক্রাইব করে সাথেই থাকুন

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!
%d bloggers like this: