Hello ! M y name is Joseph Harouna. Thank you for your many tutorials very informative and very useful. I would like to know if it is possible to fill one or more textboxes or comboboxes just by selecting a name in a first combobox. Thank you for giving me the VBA code that I need. Greetings! Joseph Harouna.
Sir, I want to calculate the employee’s age based on the date of birth and make TextBox 1 accept writing the date in the form of 1990 and 01/01/1990 and TextBox2 as the result of the calculation using the if function. Thank you
How do we change the textbox2 format like textbox 1 example textbox 1 equals a specific date 01/01/1990 textbox 2 equals today’s date in 08/02/2022 format or textbox 1 equals 1990 textbox 2 equals today’s date in 2022 format Thank you
This sample will guide: Private Sub CommandButton1_Click() TextBox1.Value = Date TextBox2.Value = TextBox1.Value TextBox2.Value = Format(TextBox2.Value, "dd/mm/yyyy") End Sub
Sir how can i restrict a column in excel for date entery as DD-MM-YYYY otherwise date not enter in particlar cell and show a msgbox enter date in DD-MM-YYY
It's important to note the following when working with dates in Excel: 1. Date variables display dates based on your system's short date format 2. Time is displayed also according to your system's format 3. We can modify our date and time settings via 'Time & Language' options in Windows 10 Settings 4. We always use the US date formats (mm/dd/yyyy) when we write the VBA code. Therefore, myDate=#11/12/2019# assigns this value to 12th November 2019 and not 11th December 2019 even if your system is set to display dd/mm/yyyy 5. In fact windows 10 offers only the format dd/mmm/yyyy Private Sub Worksheet_Change(ByVal Target As Range) Dim ws As Worksheet Dim rng As Range Set ws = Sheets("Sheet1") Set rng = ws.Range("A2:A100") For Each c In rng If c.Value "" And Not IsDate(c) Then c.ClearContents MsgBox "Only date entries allowed in this column and the format is dd/mm/yyyy" End If Next c End Sub
Sir i do have a problem with date in user form. When the date is in textbox it's in dd-mm-yyyy format (10-Sep-2021) but when I push the value to sheet it's taking as mm as date dd as month 09 Oct 2021.
Try changing the time and date in your 'region' settings in windows. You can also search my website for a number of solutions to this problem: www.exceltrainingvideos.com/
Helping video I was looking the same I have form having 5 date box I am facing error 13 If I leave a blank I use one command to ignore this error But this time I excel cell having some dummy date automatically How to solve this
Sir, I sm using vb6. 0. I am entering time (hh:mm) in one Text box and in another text box I am entering (mm) to be increment. I want to add the mm and display.
नमस्ते सर, मैने एक पेमेंट और receipt user फॉर्म बनाय है, मै 3 अलग अलग बँक बुक और कॅश बुक maintain करणा चाहता हू, मैं 3 अलग अलग बँक use करता हूं, example जब मैं first सिलेक्ट करू तो xl sheet1 मे डेटा ट्रान्सफर हो, और second & third bank सिलेक्ट करू तो sheet2 और sheet3 मे डेटा ट्रान्सफर हो, और cash के लिए sheet4,,,,,,, कृपया हेल्प किजीए..... श्री फलके
नमस्ते सर, मैने युजर फॉर्म मे डेट टेक्स्ट बॉक्स के लिये userform initialize मे txtdate= formate(date,"dd-mmm-yyyy") कोड युझ किया है, और यह ठिकसे वर्क होता है, लेकीन जब मै कोई एन्ट्री अपडेट करणेकेलीये लिस्टबॉक्स से युजरफॉर्म मे कॉल करता हु तो वहा Date Textbox मे कुछ संख्या आती है, तो इसे update करते समय कैसे Date format मे लाया जा सकता हैं
Private Sub ListBox1_Click() TextBox1 = ListBox1.Value TextBox1 = Format(TextBox1, "dd-mmm-yyyy") End Sub Please share my TH-cam channel on Excel with all your friends. मेरा चैनल अपने सब मित्रों के साथ शेयर करें. धन्यवाद
Hello ! M y name is Joseph Harouna. Thank you for your many tutorials very informative and very useful. I would like to know if it is possible to fill one or more textboxes or comboboxes just by selecting a name in a first combobox. Thank you for giving me the VBA code that I need. Greetings! Joseph Harouna.
This link will help: www.exceltrainingvideos.com/tag/create-manage-database-with-user-form/
Or search www.exceltrainingvideos.com
Sir, I want to calculate the employee’s age based on the date of birth and make TextBox 1 accept writing the date in the form of 1990 and 01/01/1990 and TextBox2 as the result of the calculation using the if function. Thank you
How do we change the textbox2 format like textbox 1 example textbox 1 equals a specific date 01/01/1990 textbox 2 equals today’s date in 08/02/2022 format or textbox 1 equals 1990 textbox 2 equals today’s date in 2022 format Thank you
This sample will guide:
Private Sub CommandButton1_Click()
TextBox1.Value = Date
TextBox2.Value = TextBox1.Value
TextBox2.Value = Format(TextBox2.Value, "dd/mm/yyyy")
End Sub
Sir how can i restrict a column in excel for date entery as DD-MM-YYYY otherwise date not enter in particlar cell and show a msgbox enter date in DD-MM-YYY
It's important to note the following when working with dates in Excel:
1. Date variables display dates based on your system's short date format
2. Time is displayed also according to your system's format
3. We can modify our date and time settings via 'Time & Language' options in Windows 10 Settings
4. We always use the US date formats (mm/dd/yyyy) when we write the VBA code. Therefore, myDate=#11/12/2019# assigns this value to 12th November 2019 and not 11th December 2019 even if your system is set to display dd/mm/yyyy
5. In fact windows 10 offers only the format dd/mmm/yyyy
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet
Dim rng As Range
Set ws = Sheets("Sheet1")
Set rng = ws.Range("A2:A100")
For Each c In rng
If c.Value "" And Not IsDate(c) Then
c.ClearContents
MsgBox "Only date entries allowed in this column and the format is dd/mm/yyyy"
End If
Next c
End Sub
Great Thanks a lot very useful
Glad it was helpful!
Sir i do have a problem with date in user form. When the date is in textbox it's in dd-mm-yyyy format (10-Sep-2021) but when I push the value to sheet it's taking as mm as date dd as month 09 Oct 2021.
Try changing the time and date in your 'region' settings in windows. You can also search my website for a number of solutions to this problem: www.exceltrainingvideos.com/
Helping video
I was looking the same
I have form having 5 date box
I am facing error 13
If I leave a blank
I use one command to ignore this error
But this time I excel cell having some dummy date automatically
How to solve this
This link will guide: www.exceltrainingvideos.com/format-function-with-dates-vba/
Sir, I sm using vb6. 0. I am entering time (hh:mm) in one Text box and in another text box I am entering (mm) to be increment. I want to add the mm and display.
You want to display the total minutes or just the new time?
@@Exceltrainingvideos just new time, ex entered time is 12:30, incremenr 15 min. Result should be 12:30, 12:45, 01:00, 01:15
Can you give an example of a situation where this could be useful?
@@Exceltrainingvideos in preplanned production for taggiing after process on each item.
@@Exceltrainingvideos just new time
Good one sir
Thanks ... Thanks.
Waiting for a solution dear sir
नमस्ते सर, मैने एक पेमेंट और receipt user फॉर्म बनाय है, मै 3 अलग अलग बँक बुक और कॅश बुक maintain करणा चाहता हू, मैं 3 अलग अलग बँक use करता हूं, example जब मैं first सिलेक्ट करू तो xl sheet1 मे डेटा ट्रान्सफर हो, और second & third bank सिलेक्ट करू तो sheet2 और sheet3 मे डेटा ट्रान्सफर हो, और cash के लिए sheet4,,,,,,, कृपया हेल्प किजीए..... श्री फलके
नमस्ते सर, मैने युजर फॉर्म मे डेट टेक्स्ट बॉक्स के लिये userform initialize मे txtdate= formate(date,"dd-mmm-yyyy") कोड युझ किया है, और यह ठिकसे वर्क होता है, लेकीन जब मै कोई एन्ट्री अपडेट करणेकेलीये लिस्टबॉक्स से युजरफॉर्म मे कॉल करता हु तो वहा Date Textbox मे कुछ संख्या आती है, तो इसे update करते समय कैसे Date format मे लाया जा सकता हैं
Private Sub ListBox1_Click()
TextBox1 = ListBox1.Value
TextBox1 = Format(TextBox1, "dd-mmm-yyyy")
End Sub
Please share my TH-cam channel on Excel with all your friends.
मेरा चैनल अपने सब मित्रों के साथ शेयर करें. धन्यवाद
Crazy crazy crazy