Banner

Monday, June 29, 2020

How to Add cells comment And Data Validation copy Paste Excel VBA

How to Add cells comment And Data Validation copy Paste Excel VBA

A Video You can add On cells comment box with details account No, email ID,customer Total Amount Also data validation Copy paste In Next Cells Automatically Thank you
एक वीडियो आप विवरण खाते के साथ कक्षों पर टिप्पणी बॉक्स में जोड़ सकते हैं खाता नहीं, ईमेल आईडी, ग्राहक कुल राशि इसके अलावा डेटा सत्यापन कॉपी पेस्ट अगले कक्षों में स्वचालित रूप से धन्यवाद
فيديو يمكنك إضافة مربع التعليقات على الخلايا مع تفاصيل الحساب لا ، ومعرف البريد الإلكتروني ، والمبلغ الإجمالي للعميل أيضًا التحقق من صحة البيانات نسخ ولصق في الخلايا التالية تلقائيًا

How to Add cells comment And Data Validation copy Paste Excel VBA

Watch Video



Thursday, June 25, 2020

How to Image Fill In Imagecombo Excel VBA Video #1 Image Fill Manually

How to Use Imagecombobox Excel VBA Video #1 Image Fill Manually

A Video you can use this Imagecombo text and image In One series Like Admin Name and Admin Photo  Thank you
एक वीडियो आप इस Imagecombo पाठ और छवि को एक श्रृंखला में उपयोग कर सकते हैं जैसे व्यवस्थापक नाम और व्यवस्थापक फोटो धन्यवाद
فيديو يمكنك استخدام نص وصورة Imagecombo في سلسلة واحدة مثل اسم المسؤول وصورة المشرف شكرًا لك

How to Use Imagecombobox Excel VBA Video #1 Image Fill Manually

Watch Video

Monday, June 22, 2020

Auto Generate Data Entry Form Excel VBA

Auto Generate Data Entry Form Excel VBA

A Video you can use data entry this automatically generating label and textbox by counting sheet. Header Text Also Capture Label Caption Sheets Header Text Automatically Thank you
एक वीडियो जिसे आप डेटा प्रविष्टि का उपयोग करके स्वचालित रूप से लेबल और टेक्स्ट बॉक्स की गणना कर सकते हैं।
فيديو يمكنك استخدام إدخال البيانات هذا تلقائيًا إنشاء تسمية ومربع نص عن طريق حساب الورقة. نص العنوان أيضًا التقاط عنوان تسمية ورقة رأس النص تلقائيًا

Auto Generate Data Entry Form Excel VBA

Watch Video

Thursday, June 18, 2020

Extract Data Only Unique ID Excel Userform VBA

Extract Data Only Unique ID Excel Userform VBA

A VideoTutorial helping find out to listbox or worksheet only unique id (without Duplicate Value) and convert date to month and year format Thank you razakmcr Youtube Channel

एक वीडियोटाइपर्स लिस्टबॉक्स या वर्कशीट को केवल यूनिक आईडी (डुप्लीकेट वैल्यू के बिना) पता लगाने में मदद करता है और तारीख को महीने और साल के प्रारूप में परिवर्तित करता है। धन्यवाद razakmcr Youtube Channel

فيديو تعليمي يساعد في معرفة مربع القائمة أو ورقة العمل فقط معرف فريد (بدون قيمة مكررة) وتحويل التاريخ إلى تنسيق الشهر والسنة شكرا لك قناة رازكمكر على يوتيوب

Extract Data Only Unique ID Excel Userform VBA

Watch Video



Thursday, June 11, 2020

Create Inventory Stock Report Form Excel VBA

Create Inventory Stock Report Form Excel VBA

A Video Creating inventory report Sales Qty Purchase Qty Balance Qty And Stock Amount With in One click support ur small business Thank you razakmcr


एक वीडियो बनाना इन्वेंट्री रिपोर्ट, बिक्री मात्रा खरीद मात्रा संतुलन मात्रा और स्टॉक राशि एक क्लिक के साथ उर छोटे व्यवसाय का समर्थन करती है
धन्यवाद razakmcr

فيديو إنشاء تقرير مخزون المبيعات الكمية الكمية الشراء الكمية الكمية الكمية مع بنقرة واحدة دعم الأعمال الصغيرة الخاصة بك شكرا لك razakmcr



Watch Video

VBA Code

CommandButton1

Private Sub CommandButton1_Click() Dim i As Long Me.ListBox1.Clear Me.ListBox1.AddItem Me.ListBox1.List(0, 0) = "item Name" Me.ListBox1.List(0, 1) = "item No" Me.ListBox1.List(0, 2) = "Purchase Qty" Me.ListBox1.List(0, 3) = "Purchase Price" Me.ListBox1.List(0, 4) = "Sales Qty" Me.ListBox1.List(0, 5) = "Sales Pirce" Me.ListBox1.List(0, 6) = "Balance Qty" Me.ListBox1.List(0, 7) = "Stock Amount" For i = 1 To Sheet3.Range("A1000000").End(xlUp).Row Me.ListBox1.AddItem Sheet3.Cells(i, "A") 'Sheet3("inventory") Column(A) Item Name 'Listbox item fill Me.ListBox1.List(ListBox1.ListCount - 1, 1) = Sheet3.Cells(i, "B") 'Column(B)Item Code Next i '__________ Dim C As Integer Dim X As Long Dim sum, sum1, sum2, sum3 As Double With Me.ListBox1 For C = 1 To .ListCount - 1 For X = 2 To Sheet2.Range("A1000000").End(xlUp).Row 'Sheet2("Database") 'Column(G) Itemcode 'Column(D) Voucher If Val(.List(C, 1)) = Sheet2.Cells(X, "G") And Sheet2.Cells(X, "D") = "Purchase" Then 'Purchase Qty sum = sum + Sheet2.Cells(X, "H") 'Column(H) Qty 'Purchase Amount sum1 = sum1 + Sheet2.Cells(X, "J") 'Column(J) Amount .List(C, 2) = sum .List(C, 3) = sum1 'Column(G) Itemcode 'Column(D) Voucher ElseIf Val(.List(C, 1)) = Sheet2.Cells(X, "G") And Sheet2.Cells(X, "D") = "Sales" Then 'Sales Qty sum2 = sum2 + Sheet2.Cells(X, "H") 'Column(H) Qty 'Sales Amount sum3 = sum3 + Sheet2.Cells(X, "J") 'Column(J) Amount .List(C, 4) = sum2 .List(C, 5) = sum3 End If Next X sum = 0 sum1 = 0 sum2 = 0 sum3 = 0 '______________ 'Balance Qty 'Purchase Qty - 'Sales Qty .List(C, 6) = Val(.List(C, 2)) - Val(.List(C, 4)) If Val(.List(C, 6)) >= 1 Then 'Balance Amount 'Purchase Amount / Purchase Qty * Balance Qty .List(C, 7) = Val(.List(C, 3)) / Val(.List(C, 2)) * Val(.List(C, 6)) End If Next C .Selected(0) = True End With
End Sub

CommandButton2

Private Sub CommandButton2_Click()

Me.ListBox1.Clear Me.ListBox1.AddItem Me.ListBox1.List(0, 0) = "Date" Me.ListBox1.List(0, 1) = "Invoice No" Me.ListBox1.List(0, 2) = "Voucher" Me.ListBox1.List(0, 3) = "Ledeger" Me.ListBox1.List(0, 4) = "Item Name" Me.ListBox1.List(0, 5) = "Item Code" Me.ListBox1.List(0, 6) = "Qty" Me.ListBox1.List(0, 7) = "Price" Me.ListBox1.List(0, 8) = "Total" Dim i As Long For i = 2 To Sheet2.Range("A1000000").End(xlUp).Row 'Sheet2("Database") 'Column(G) ItemCode If Sheet2.Cells(i, "G") = Val(Me.TextBox1) Then With Me.ListBox1 .AddItem For X = 1 To 9 'Loop 1 to 9 Column Listbox And Worksheet .List(.ListCount - 1, X - 1) = Sheet2.Cells(i, X + 1) Next X End With End If Next i Me.ListBox1.Selected(0) = True Me.ListBox1.ColumnCount = 9 '____________________ Dim C As Integer Dim sum, sum1, sum2, sum3 As Double With Me.ListBox1 For C = 1 To Me.ListBox1.ListCount - 1 On Error Resume Next 'sum On Listbox 'Purchase Qty If .List(C, 2) = "Purchase" Then sum = sum + Val(.List(C, 6)) End If 'Sales Qty If .List(C, 2) = "Sales" Then sum1 = sum1 + Val(.List(C, 6)) End If 'Purchase Amount If .List(C, 2) = "Purchase" Then sum2 = sum2 + Val(.List(C, 8)) End If 'Sales Amount If .List(C, 2) = "Sales" Then sum3 = sum3 + Val(.List(C, 8)) End If Next C End With '_______________ Me.ListBox1.AddItem "____________________" Me.ListBox1.List(ListBox1.ListCount - 1, 1) = "_____________________" Me.ListBox1.AddItem "Purchase Qty" Me.ListBox1.List(ListBox1.ListCount - 1, 1) = sum Me.ListBox1.AddItem "Sales Qty" Me.ListBox1.List(ListBox1.ListCount - 1, 1) = sum1 Me.ListBox1.AddItem "Balance Qty" Me.ListBox1.List(ListBox1.ListCount - 1, 1) = Val(sum - sum1) Me.ListBox1.AddItem "Purchase Amount" Me.ListBox1.List(ListBox1.ListCount - 1, 1) = sum2 Me.ListBox1.AddItem "Sales Amount" Me.ListBox1.List(ListBox1.ListCount - 1, 1) = sum3 End Sub Private Sub ListBox1_Click() On Error Resume Next Me.TextBox1 = Me.ListBox1.List(Me.ListBox1.ListIndex, 1)
End Sub

Textbox1

Private Sub TextBox1_Change() If IsNumeric(Me.TextBox1) Then Me.CommandButton2.Enabled = True Else Me.CommandButton2.Enabled = False End If End Sub

Saturday, June 6, 2020

Auto Generate Serial Number With Every Date Excel VBA

Auto Generate Serial Number With Every Date Excel VBA

A Video Tutorial Help Generate Serial Number Automatically with Your Transaction with Depending date razakmcr Thank you

एक वीडियो ट्यूटोरियल की मदद से दिनांक के साथ स्वचालित रूप से अपने लेनदेन के साथ सीरियल नंबर उत्पन्न करें धन्यवाद razakmcr धन्यवाद

تعليمات فيديو تعليمي إنشاء الرقم التسلسلي تلقائيًا مع معاملتك مع اعتماد التاريخ razakmcr شكرا لك

Auto Generate Serial Number With Every Date Excel VBA



                                                                               Watch Video

Thursday, June 4, 2020

How to Use inkEdit Userform Excel VBA

How to Use inkEdit Userform Excel VBA

A Video for inkEdit Use for like Textbox in userform transfer data to worksheet with wrap text Thankyou razakmcr

इंकडिट के लिए एक वीडियो, रैप टेक्स्ट के साथ वर्कशीट में यूजरफॉर्म ट्रांसफर डेटा में टेक्स्टबॉक्स की तरह उपयोग करें थैंक्यू

فيديو لـ inkEdit استخدم لمثل Textbox في بيانات نقل نموذج المستخدم إلى ورقة العمل مع نص التفاف
شكرا لك razakmcr

How to Use inkEdit Userform Excel VBA


Private Sub CommandButton1_Click() Sheet1.Range("A100000").End(xlUp).Offset(1, 0) = Me.InkEdit1.Text & vbLf & "______________" Me.InkEdit1.Text = "" Call UserForm_Initialize End Sub
Private Sub UserForm_Initialize() Me.InkEdit1.Text = Date & " " & Format(Time, "HH:MM AM/PM") Me.InkEdit1.SelStart = Len(Me.InkEdit1) End Sub

Watch Video




Thursday, May 21, 2020

Data Entry By Group wise Userform Excel VBA

Data Entry By Group wise Userform Excel VBA

Enter Data to database by matching ledger without filter will come data by group separate using in Useform textbox and Commandbutton and label

फ़िल्टर के बिना लेज़र के मेल से डेटाबेस में डेटा दर्ज करें, उपयोग टेक्स्टबॉक्स और कमांडबटन और लेबल में अलग से समूह द्वारा डेटा आएगा
أدخل البيانات إلى قاعدة البيانات عن طريق مطابقة دفتر الأستاذ بدون عامل تصفية البيانات حسب المجموعة منفصلة باستخدام مربع نص Useform و Commandbutton والتسمية

Data Entry By Group wise Userform Excel VBA



Thursday, May 14, 2020

How to Create inventory Manager Part1&Part2 Excel VBA

How to Create inventory Manager Part1 &Part2 Excel VBA

A Blog from razakmcr How to Create inventory Manager Excel VBA Create Inventory Manager Save, Save As ,Edit Update,Barcode Project, Print Multiple Count,Printer Page Setup All In One Video Thank you
This tutorial created In two Video

Razakmcr से एक वीडियो
इन्वेंट्री मैनेजर एक्सेल VBA कैसे बनाएं इन्वेंटरी मैनेजर बनाएं, इस रूप में सहेजें, एडिट अपडेट, बारकोड प्रोजेक्ट, प्रिंट मल्टीपल काउंट, प्रिंटर पेज सेटअप सभी एक वीडियो में धन्यवाद यह ट्यूटोरियल दो वीडियो में बनाया गया है



كيفية إنشاء مدير المخزون إكسل VBA

إنشاء مدير الجرد حفظ ، حفظ باسم ، تحرير التحديث ، مشروع الباركود ، طباعة عد متعدد ، إعداد صفحة الطابعة الكل في فيديو واحد شكرا لك

تم إنشاء هذا البرنامج التعليمي في فيديوين

How to Create inventory Manager Part1  Excel VBA

Video Part 1

Video Part2


Thursday, May 7, 2020

How to insert Currency Symbols In Userform Excel VBA

How to insert Currency Symbols In Userform Excel VBA



In this Blog I showing how to insert currency symbols
in Listbox using VBA code By Change combobox
U can choose different currency symbols from combobox dropdown menu


How to insert Currency Symbols In Userform Excel VBA

                                                                 Watch Video

Currency Symbols

Code for Symbols This Code Not Used In Tutorial Video)
Example
'Sheet1.range("A1")=ChrW$(&H20B9&)   '(Indian Currency)
Ucan get Currency Symbol Code
Excel Tab Menu   Insert   Symbols
See Photo
How to insert Currency Symbols In Userform Excel VBA


USA                                  $
Indian rupee                                  ₹
UAE                                  د.إ
Pound                                  £
Rupee                                  ₨
Euro Currency                                  €
Yen                                  ¥
French                                  ₣
Morocco                                  .د.م
Afghanistan                                  Af
Iraq                                  ع.د
Iran                                  ﷼
Oman                                  ر.ع.
Bangladesh                                  ৳
Bahrain                                  ب.د
North Korea                                  ₩
Qatar                                  ر.ق
Thailand                                  ฿
Saudi Arabia                                  ر.س

Tutorial VBA Code

For Userform Combobx Fill Data from Sheet2
Private Sub UserForm_Initialize()
'Combobox fill From Sheet2
Dim i As Long
For i = 2 To Sheet2.Range("A1000000").End(xlUp).Row
Me.ComboBox1.AddItem Sheet2.Cells(i, "A")
Me.ComboBox1.List(Me.ComboBox1.ListCount - 1, 1) = Sheet2.Cells(i, "B")
Next i
End Sub

For Listbox fill Data from Sheet2 with Currency Symnols
Private Sub CommandButton1_Click()
Dim A  As String
Dim i As Long
Me.ListBox1.Clear
If Me.ComboBox1 <> "" Then
A = Me.ComboBox1.List(Me.ComboBox1.ListIndex, 1)
For i = 2 To Sheet2.Range("D1000000").End(xlUp).Row
Me.ListBox1.AddItem Sheet2.Cells(i, "D")
Me.ListBox1.List(ListBox1.ListCount - 1, 1) = A & " " & Sheet2.Cells(i, "E")
Next i

Dim sum As Double
Dim x As Integer
Dim C, D As String
For x = 0 To Me.ListBox1.ListCount - 1
C = Len(Me.ListBox1.List(x, 1))
D = Len(A)
sum = sum + Val(Right(Me.ListBox1.List(x, 1), C - D))
Next x
 Me.ListBox1.AddItem
 Me.ListBox1.AddItem "Total"
 Me.ListBox1.List(ListBox1.ListCount - 1, 1) = A & " " & Format(sum, "#####.00")

 End If
End Sub





Sunday, April 26, 2020

Create Rent A Car Agreement Form Excel VBA

Create Rent A Car Agreement Form Excel VBA

Welcome razakmcr Excel Tutorial 
In this Tutorial I Created Rent A car Agreement form 
 Name Address Contact And departure date arrival date and count day and extra hours rent amount   And Grand Total  Automatically  
I thing this will useful information  if Any wrong Any doubt please  Inform me 
Thank you   Also Watch Video Below And VBA Code
आपका स्वागत है razakmcr एक्सेल ट्यूटोरियल
इस ट्यूटोरियल में मैंने रेंट ए कार एग्रीमेंट फॉर्म तैयकिया नाम पता संपर्क और प्रस्थान की तारीख आगमन कतऔरदिन और अतिरिक्त घंटे किराया राशि और ग्रैंड कुल स्वचालित रूप से गिनें
मुझे लगता है कि यह उपयोगी जानकारी होगी यदि कोई भी गलत हो तो कृपया मुझे सूचित करें

धन्यवाद इसके अलावा नीचे वीडियो देखें और VBA कोड

Create Rent A Car Agreement Form Excel VBA

Watch Video



Check VBA Code

This Code For Ageement Number Project And Departure Date  Departure Time Arrival Date And Time


Private Sub UserForm_Initialize()
Dim RNG As Long
RNG = Sheet4.Range("A1000000").End(xlUp).Row + 1
Me.AGR1 = RNG + 11000
Me.Date1 = Date 'Dedparture Date
Me.Time1 = Format(Time, "HH:MM AM/PM") 'Departure Time
Me.Date2 = Date 'Arrival Date
Me.Time2 = Format(Time, "HH:MM AM/PM") 'Arrival Time
End Sub

This Code For Textbox Textformat To properCase
Private Sub TB4_Change()
On Error Resume Next      'Textbox ProperCase
Me.TB4 = Format(StrConv(Me.TB4, vbProperCase))
End Sub
Private Sub TB5_Change()
On Error Resume Next     'Textbox ProperCase
Me.TB5 = Format(StrConv(Me.TB5, vbUpperCase))
End Sub
Private Sub TB8_Change()
On Error Resume Next      'Textbox ProperCase
Me.TB8 = Format(StrConv(Me.TB8, vbProperCase))
End Sub

This Code For (CommandButtton) Frame Enable for Cteate agreement  Fill combobox 
Private Sub DeptCMD_Click() 'Commandbutton
Dim i As Long
'For Departure
Me.DeptFrame.Enabled = True
Me.ComboBox1.Clear
For i = 2 To Sheet2.Range("A100000").End(xlUp).Row
Me.ComboBox1.AddItem Sheet2.Cells(i, "A") 'Fill Vehicle Number
Me.ComboBox1.List(Me.ComboBox1.ListCount - 1, 1) = Sheet2.Cells(i, "B") 'Vehicle Name
Next i
Me.TB1.SetFocus
End Sub

This Code For (CommandButtton) Frame Enable for Cteate agreement  Fill combobox 
Private Sub ArrCMD_Click() 'Commandbutton
On Error Resume Next
Me.ArrFrame.Enabled = True
Me.ArrDate = Date
Me.ARRTime = Format(Time, "HH:MM AM/PM")
Me.TB13 = CDate(Me.ArrDate) - CDate(Me.DPTDate) 'In Date-Out Date
Me.TB16 = Format(Abs(TimeValue(Me.ARRTime) - TimeValue(Me.DPTTime)) * 24, "##") 'Intime - Out Time
Dim RNG1 As Long, i As Long
'Search Data to Arrival Form Matching By Agreement Number
RNG1 = Sheet4.Range("A1000000").End(xlUp).Row + 1
For i = 2 To RNG1        '(Agreement No)
If Sheet4.Cells(i, "D") = Val(Me.AGR2) Then
With Sheet4
Me.AGR1.Value = .Range("D" & i)              'Sheet4Column(D)
Me.TB1 = .Range("E" & i)                       'Renter Name
Me.TB2 = .Range("F" & i)                       'Cntact
Me.IDBox = .Range("G" & i)                    'Idbox
Me.TB3 = .Range("H" & i)                       'PP No
Me.TB4 = .Range("i" & i)                       'Driver Name
Me.TB5 = .Range("j" & i)                        'Nationality
Me.TB6 = .Range("K" & i)                       'Contact
Me.TB7 = .Range("L" & i)                      'Driving License No
Me.TB8 = .Range("M" & i)                      'Place If Issue
Me.TB9 = .Range("N" & i)                        'Expiry date
Me.ComboBox1 = .Range("O" & i)                 'Expiry date
Me.TB12 = .Range("P" & i)                      'Vehicle Name
Me.DPTDate = .Range("Q" & i)
Me.TB13 = CDate(Me.ArrDate) - CDate(Me.DPTDate)    'Calculate Days
Me.DPTTime = Format(.Range("R" & i), "HH:MM AM/PM") 'Time
Me.Date1 = .Range("Q" & i)
Me.Time1 = Format(.Range("R" & i), "HH:MM AM/PM")
Me.TB16 = Format(Abs(TimeValue(Me.ARRTime) - TimeValue(Me.DPTTime)) * 24, "##") 'calculate Time
Me.TB14 = .Range("V" & i)                      'Rent per Day
Me.TB17 = .Range("X" & i)                      'Extran Charge
Me.TB18 = .Range("Y" & i)                      'Traffic fine
Me.TB19 = .Range("Z" & i)                      'parking fine
Me.TB11 = .Range("V" & i)                      'Rent per Day
Me.TB21 = .Range("AC" & i).Value
Me.TB23 = .Range("AE" & i)                     'Status
End With
End If
Next i
Call TB13_Change
End Sub
This Code For Textbox Format
Private Sub ArrDate_AfterUpdate()
On Error Resume Next
Me.ArrDate = CDate(Me.ArrDate)
End Sub
Private Sub ComboBox1_Click()
Me.TB12 = Me.ComboBox1.List(Me.ComboBox1.ListIndex, 1) 'Vehicle Name
End Sub
This Code For (CommandButtton) Frame Enable And Arrival vehicle Checkout

Private Sub ArrCMD_Click() 'Commandbutton
On Error Resume Next
Me.ArrFrame.Enabled = True
Me.ArrDate = Date
Me.ARRTime = Format(Time, "HH:MM AM/PM")
Me.TB13 = CDate(Me.ArrDate) - CDate(Me.DPTDate) 'In Date-Out Date
Me.TB16 = Format(Abs(TimeValue(Me.ARRTime) - TimeValue(Me.DPTTime)) * 24, "##") 'Intime - Out Time
Dim RNG1 As Long, i As Long
'Search Data to Arrival Form Matching By Agreement Number
RNG1 = Sheet4.Range("A1000000").End(xlUp).Row + 1
For i = 2 To RNG1        '(Agreement No)
If Sheet4.Cells(i, "D") = Val(Me.AGR2) Then
With Sheet4
Me.AGR1.Value = .Range("D" & i)              'Sheet4Column(D)
Me.TB1 = .Range("E" & i)                       'Renter Name
Me.TB2 = .Range("F" & i)                       'Cntact
Me.IDBox = .Range("G" & i)                    'Idbox
Me.TB3 = .Range("H" & i)                       'PP No
Me.TB4 = .Range("i" & i)                       'Driver Name
Me.TB5 = .Range("j" & i)                        'Nationality
Me.TB6 = .Range("K" & i)                       'Contact
Me.TB7 = .Range("L" & i)                      'Driving License No
Me.TB8 = .Range("M" & i)                      'Place If Issue
Me.TB9 = .Range("N" & i)                        'Expiry date
Me.ComboBox1 = .Range("O" & i)                 'Expiry date
Me.TB12 = .Range("P" & i)                      'Vehicle Name
Me.DPTDate = .Range("Q" & i)
Me.TB13 = CDate(Me.ArrDate) - CDate(Me.DPTDate)    'Calculate Days
Me.DPTTime = Format(.Range("R" & i), "HH:MM AM/PM") 'Time
Me.Date1 = .Range("Q" & i)
Me.Time1 = Format(.Range("R" & i), "HH:MM AM/PM")
Me.TB16 = Format(Abs(TimeValue(Me.ARRTime) - TimeValue(Me.DPTTime)) * 24, "##") 'calculate Time
Me.TB14 = .Range("V" & i)                      'Rent per Day
Me.TB17 = .Range("X" & i)                      'Extran Charge
Me.TB18 = .Range("Y" & i)                      'Traffic fine
Me.TB19 = .Range("Z" & i)                      'parking fine
Me.TB11 = .Range("V" & i)                      'Rent per Day
Me.TB21 = .Range("AC" & i).Value
Me.TB23 = .Range("AE" & i)                     'Status
End With
End If
Next i
Call TB13_Change
End Sub
Private Sub ArrDate_AfterUpdate()
On Error Resume Next
Me.ArrDate = CDate(Me.ArrDate)
End Sub
Private Sub ComboBox1_Click()
Me.TB12 = Me.ComboBox1.List(Me.ComboBox1.ListIndex, 1) 'Vehicle Name
End Sub

This Code For CommandButtton Ebable And Desable And Statusbar(Textbox) Text project
Private Sub TB23_Change()
On Error Resume Next
If Me.TB23 = "Arrived" Then
Me.TB23.ForeColor = &H8000&      'Stauts Bar Display On Departure Or Arrived
Me.CommandButton4.Enabled = False
Else
Me.TB23.ForeColor = vbRed
Me.CommandButton4.Enabled = True
End If
On Error Resume Next
If Val(Me.TB22) >= 1 Then
Me.CommandButton4.Enabled = True
Me.TB22.ForeColor = vbRed  'Balance Amount
End If
End Sub

This Code For Textbox Format And  Divide And Sum And Multiple Amount
Private Sub TB1_Change()
On Error Resume Next
Me.TB1 = Format(StrConv(Me.TB1, vbProperCase))
End Sub
Private Sub TB10_Change()
On Error Resume Next
Me.TB10 = Format(StrConv(Me.TB1, vbProperCase))
End Sub
Private Sub TB13_Change()
On Error Resume Next
Me.TB15 = Format(Val(Me.TB13) * Val(Me.TB14), "#####.00")
Call TB16_Change
Call TB15_Change
End Sub
Private Sub TB14_Change()
On Error Resume Next
Call TB13_Change
End Sub
Private Sub TB15_Change()
On Error Resume Next
'Rent Calculater(rent Amount) +(ExtraCharge) +(Trafiic fine)+(Parking fine)
Me.TB20 = Format(Val(Me.TB15) + Val(Me.TB17) + Val(Me.TB18) + Val(Me.TB19), "#####.00")
Call TB21_Change
End Sub
Private Sub TB16_Change()
On Error Resume Next
A = Val(Me.TB14) / 24  'RentAmount/24 hour
Me.TB17 = Format(Val(Me.TB16) * A, "#####.00") 'Amount* hours
Call TB15_Change
End Sub

This Code For Textbox Format And Call Micro
Private Sub TB17_Change()
On Error Resume Next
Call TB15_Change
End Sub
Private Sub TB18_AfterUpdate()
On Error Resume Next
Me.TB18 = Format(Me.TB18, "#####.00") 'Number format
End Sub
Private Sub TB18_Change()
Call TB15_Change
End Sub
Private Sub TB19_AfterUpdate()
On Error Resume Next
Me.TB19 = Format(Me.TB19, "#####.00") 'Number format
End Sub
Private Sub TB19_Change()
Call TB15_Change
End Sub
Private Sub TB21_Change()
On Error Resume Next
                '(Pay Amount) - (Paid Amount)
Me.TB22 = Format(Val(Me.TB20) - Val(Me.TB21), "#####.00") 'Number format
Private Sub TB1_Change()
This Code For Option Button Choose Pass/Id/Other
Private Sub OptionButton1_Click()
Me.IDBox = "Passport"
Me.TBRange.Value = "C"
Me.TB3.SetFocus
End Sub
Private Sub OptionButton2_Click()
Me.IDBox = "ID Card"
Me.TBRange = "D"
Me.TB3.SetFocus
End Sub
Private Sub OptionButton3_Click()
Me.IDBox = "Other"
Me.TBRange = "E"
Me.TB3.SetFocus
End Sub
This Code For Textbox If function For Sheet4(Databse) Column Address C D E
Private Sub DPTDate_AfterUpdate()
On Error Resume Next
Me.DPTDate = CDate(Me.DPTDate)
End Sub
Private Sub IDBox_Change()
If Me.IDBox = "Passport" Then
Me.TBRange = "C"
ElseIf Me.IDBox = "ID Card" Then
Me.TBRange = "D"
Else
Me.TBRange = "E"
End If
End Sub

This Code For Transfer Data to Sheet4(Database) Departure Data And CallCMD2 And CMD5
Private Sub CommandButton1_Click()
Dim RNG1 As Long
'Save To database(sheet4)
RNG1 = Sheet4.Range("A1000000").End(xlUp).Row + 1
With Sheet4
.Range("A" & RNG1) = RNG1 + 100
.Range("B" & RNG1) = Me.Date1
.Range("C" & RNG1) = Format(Time, "HH:MM AM/PM")
.Range("D" & RNG1) = Me.AGR1.Value
.Range("E" & RNG1) = Me.TB1                        'Renter Name
.Range("F" & RNG1) = Me.TB2                        'Cntact
.Range("G" & RNG1) = Me.IDBox                      'Idbox
.Range("H" & RNG1) = Me.TB3                        'PP No
.Range("i" & RNG1) = Me.TB4                        'Driver Name
.Range("j" & RNG1) = Me.TB5                        'Nationality
.Range("K" & RNG1) = Me.TB6                        'Contact
.Range("L" & RNG1) = Me.TB7                        'Driving License No
.Range("M" & RNG1) = Me.TB8                        'Place If Issue
.Range("N" & RNG1) = Me.TB9                        'Expiry date
.Range("O" & RNG1) = Me.ComboBox1                  'Expiry date
.Range("P" & RNG1) = Me.TB12                       'Vehicle Name
.Range("Q" & RNG1) = Date                          'DPT date
.Range("R" & RNG1) = Format(Time, "HH:MM AM/PM")   'DPT Time
.Range("V" & RNG1) = Me.TB11                       'Rent per Day
.Range("AE" & RNG1) = "On Departure"                       'Rent per Day
End With
Call CommandButton2_Click   'Clear Sheet3 Invoice Sheet And fill
If MsgBox("You want print agreement?", vbYesNo) = vbYes Then
Call CommandButton5_Click  'PrintOut
 End If
End Sub
This Code For Clear Data To Sheet3(Invoice) And Yransfer Data To sheet3 (Invoice)
Private Sub CommandButton2_Click()
With Sheet3
'Clear Invoice (Sheet3)
.Range("E" & 4) = ""
.Range("C" & 5) = ""
.Range("B" & 7) = ""
.Range("D" & 9) = ""                         'Renter Name
.Range("D" & 10) = ""
.Range("C" & 12) = ""
.Range("D" & 12) = ""
.Range("E" & 12) = ""
.Range("D" & 13) = ""                        'Driver Name
.Range("D" & 14) = ""                        'Nationality
.Range("D" & 15) = ""                        'Contact
.Range("D" & 16) = ""                        'Driving License No
.Range("D" & 17) = ""                        'Place If Issue
.Range("D" & 18) = ""                        'Expiry date
.Range("C" & 20) = ""                        'Dep Date
.Range("E" & 20) = ""                        'Dpt Time
.Range("C" & 22) = ""
.Range("E" & 22) = ""
.Range("E" & 23) = ""                        'Expiry date
.Range("E" & 24) = ""                        'Vehicle Name
.Range("E" & 25) = ""
.Range("E" & 26) = ""
.Range("E" & 27) = ""
.Range("E" & 28) = ""
.Range("E" & 29) = ""
.Range("E" & 30) = ""
.Range("E" & 31) = ""
'Fill invoice (sheet3)
.Range("E" & 4) = Me.Date1
.Range("C" & 5) = Format(Me.Time1, "HH:MM AM/PM")
.Range("B" & 7) = Me.AGR1.Value                 'Agreement No
'.Range("E" & 7) = Me.AGR1.Value                 'Agreement No
.Range("D" & 9) = Me.TB1                        'Renter Name
.Range("D" & 10) = Me.TB2                        'Cntact
Dim RN As String
RN = Me.TBRange  'Range
.Range(RN & 12) = Me.TB3                         'Id No,Passport No,Other
.Range("D" & 13) = Me.TB4                        'Driver Name
.Range("D" & 14) = Me.TB5                        'Nationality
.Range("D" & 15) = Me.TB6                        'Contact
.Range("D" & 16) = Me.TB7                        'Driving License No
.Range("D" & 17) = Me.TB8                        'Place If Issue
.Range("D" & 18) = Me.TB9                        'Expiry date
.Range("C" & 20) = Me.Date1                      'Dep Date
.Range("E" & 20) = Format(Me.Time1, "HH:MM AM/PM")   'Dpt Time
.Range("E" & 23) = Me.ComboBox1                  'Expiry date
.Range("E" & 24) = Me.TB12                       'Vehicle Name
.Range("E" & 25) = Format(Me.TB11.Value, "#####.00")   'Rent per Day
End With
End Sub

This Code For Clear Transfer Arrival Data To sheet4 And Call CMD2 And CMD5
Private Sub CommandButton3_Click()
Unload Me
UserForm2.Show
End Sub
Private Sub CommandButton4_Click()
Dim RNG1, X As Long
'Fill To Database(sheet4) arrival data
RNG1 = Sheet4.Range("A1000000").End(xlUp).Row + 1
For X = 2 To RNG1
If Sheet4.Cells(X, "D") = Val(Me.AGR2) Then
With Sheet4
.Range("S" & X) = Me.ArrDate          'Arrival Date
.Range("T" & X) = Me.ARRTime          'Arrival Time
.Range("U" & X) = Me.TB13.Value       'Total Day
.Range("W" & X) = Me.TB15.Value       'Total rent Amount
.Range("X" & X) = Me.TB17.Value       'Extra Amount
.Range("Y" & X) = Me.TB18.Value       'Traffic fine
.Range("Z" & X) = Me.TB19.Value       'Parking fine
.Range("AB" & X) = Me.TB20.Value      'Total Amount
.Range("AC" & X) = Me.TB21.Value      'Paid Amount
.Range("AD" & X) = Me.TB22.Value      'Balance Amount
.Range("AE" & X) = "Arrived"          'Status
End With
End If
Next X
Call CommandButton2_Click  'for Printsheet(sheet3) Clear And fill departure Data
'fill Printsheet(sheet3)Arrival data
Sheet3.Range("C22") = Me.ArrDate
Sheet3.Range("E22") = Me.ARRTime
Sheet3.Range("E26") = Me.TB13.Value
Sheet3.Range("E27") = Me.TB15.Value
Sheet3.Range("E28") = Me.TB17.Value
Sheet3.Range("E29") = Me.TB18.Value
Sheet3.Range("E30") = Me.TB19.Value
Sheet3.Range("E31") = Me.TB20.Value
If MsgBox("You want print agreement?", vbYesNo) = vbYes Then
Call CommandButton5_Click   'for printout
 End If
Unload Me
UserForm2.Show
End Sub
Private Sub CommandButton5_Click()
'Printout
Application.ScreenUpdating = False
With Sheet3
.Range("B2:E39").PrintOut
.PageSetup.Orientation = xlPortrait
.PageSetup.PaperSize = xlPaperA4
End With
Application.ScreenUpdating = True
End Sub