how can I fix this, my date always shows as numbers.
Please help.
Thank you.
how can I fix this, my date always shows as numbers.
Please help.
Thank you.
You need to format the date as you load it into the UserForm. It's hard to help from a picture so attach an example workbook
Hi Roy,
Thanks for the quick reply as always.
Here's the link to google drive, as I am having a hard time uploading the file as attachment here.
https://drive.google.com/file/…s3vZmWKI/view?usp=sharing
Regards,
Jhazz
If you can't attach the file it is probably too large. Try zipping it.
That file is no good anyway. It does not contain the UserForm as displayed in your images.
Hi Roy,
The UserForm I am referring to is the frmProfoma.
I have inserted the Zipped file for your reference.
Thanks for your help.
Jhazzie
This works for me.
I think you want the TextBoxes to populate from the ListBox and I know I have given you code to do this previously
Hi Roy,
The codes you have provided perfectly works for me. And I am so thankful for that.
However my problem actually is, whenever I pick a transaction on my listbox (say I want to edit something), like the one highlighted, the date is 05-April-21, but what is displayed on the textbox date is numbers 44291. Is there a way for it to display also as date?
Have you tried the example that I have just uploaded?
Hi Roy,
I did try, But it doesn't work for me. I wonder why.
Are you entering a date, e.g. 1/4/21
Hi,
for this:
[Blocked Image: https://www.ozgrid.com/forum/core/index.php?attachment/1231707-7-png/&thumbnail=1]
In Private Sub lstProformaDisplay_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
replace:
Me.txtDate.Value = Me.lstProformaDisplay.List(Me.lstProformaDisplay.ListIndex, 2)
with:
Me.txtDate.Value = Format(Me.lstProformaDisplay.List(Me.lstProformaDisplay.ListIndex, 2), "dd-mmm-yyyy")
Replace your code with
Private Sub lstProformaDisplay_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With Me
.txtProformaID.Value = .lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 0)
.txtProforma.Value = .lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 1)
.txtDate.Value = Format(.lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 2), "dd-mmm-yyyy")
.txtPONo.Value = .lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 3)
.cmbCustomer.Value = .lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 4)
.txtAddress.Value = .lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 5)
.txtValue.Value = .lstProformaDisplay.List(.lstProformaDisplay.ListIndex, 6)
End With
End Sub
Display More
Actually, you don't need Format. Use the TextBox_Change event instead of Exit
Display MoreHi,
for this:
[Blocked Image: https://www.ozgrid.com/forum/core/index.php?attachment/1231707-7-png/&thumbnail=1]
In Private Sub lstProformaDisplay_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
replace:
Me.txtDate.Value = Me.lstProformaDisplay.List(Me.lstProformaDisplay.ListIndex, 2)
with:
Me.txtDate.Value = Format(Me.lstProformaDisplay.List(Me.lstProformaDisplay.ListIndex, 2), "dd-mmm-yyyy")
Hello there,
Its perfect.
Thank you so much.
Jhazzie
Actually, you don't need Format. Use the TextBox_Change event instead of Exit
Hi again Roy,
Its awesome.
Thank you so much. You've been a lot of help for me in this project.
You're such an angel. Thank you so much.
Jhazzie
Pleased to help
Don’t have an account yet? Register yourself now and be a part of our community!