hello
I need help fixing date in column 1 in listbox based on column a in sheet 1 it shows value when I write in textbox1 the names , so I want showing like this dd/mm/yyyy
thanks in advance
hello
I need help fixing date in column 1 in listbox based on column a in sheet 1 it shows value when I write in textbox1 the names , so I want showing like this dd/mm/yyyy
thanks in advance
Hi,
put this in the userform_initialize part
Please Login or Register to view this content.
Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
If you have been helped, maybe you could click the *
hi, Joske , unfortunately nothing changes
I have read your sentence multiple times and I don't know what i can make of it but the thing I added
You need help fixing the date in column 1 in listbox
first the date was shown as 1/1/2020 and now its shown as 01/01/2020
it does what you asked.. what do you mean??
the problem is not when I run userform it's ok show date as what I want dd/mm/yyyy but when I write in textbox the name based on column b in sheet1 the date in listbox becomes values like 435466 , if you test the form you understand what I mean
Something like this.Please Login or Register to view this content.
Best Regards,
Maras.
hi, maras the problem is not in event UserForm_Initialize() also joske's code works the problem in textbox1 when I write into textbox it changes to date value like this 43831 not as your code dd-mm-yyyy
@ABDELFATTA
When you use some vba commands/properties => 'Value2' =>, learn (in the contextual help) about their specific operation in certain situations:
"The only difference between this property and the Value property is that the Value2 property doesn’t use the Currency and Date data types. You can return values formatted with these data types as floating-point numbers by using the Double data type"
again all of codes for guys work in one case if I run the form every thing is ok but when I search specific name in textbox it changes to date value I think the modifying supposes in texebox1 change event but how I no know so far I tried many of tries but nothing success
it shows the date correct for me...
Attachment 708517
Please Login or Register to view this content.
thanks Porucha I'm really sorry because I don't take your notice seriously actually I don't see value 2 where is existed because this code not mine , you're absolutely right , now it works
thanks for all guys
I had the problem that part of added items in a listbox were in the correct European (dd/mm/yyyy) and part were in the American (mm/dd/yyyy) format. The source cells were correct formatted as date, tried to solve the problem with CDate and with formatting the item when populating the listbox. Nothing helped. This has been driving me nuts - until I found this answer of yours: Value2. Thanks an awful lot!!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks