Userform will not return desired date format into textboxes

kleigh99

New Member
Joined
Aug 12, 2014
Messages
11
Hi Experts

I have been through so many potential breakthroughs in the past week via the net/forums/handbooks etc but cannot for the life of me find the exact code needed to return "dd/mm"yyyy" to my textboxes when i intend on updating exsiting data within my form.

Basically I have a textbox on the userform where i type a record in and it returns all matches to a listbox where i will then select my desired record to update upon selection it will populate all necessary textboxes/Combo boxes etc, 3 of which are date dependant, i have a command button to update and return the data to the spreadsheet as well as 2 other command buttons which close and add new row data. At the minute my spreadsheet displays the above mentioned format which is what i would like to have displayed when i need to update data or simply return values to the text boxes for client referencing purposes. I have tried heaps of codes none of which seem to return the same format as that of the spreadsheet. I currently dont have a code the give as an example as i have nearly given up.

I hope i have explained enough for anyone to grasp whats needed. If more information is required i will be happy to go into more detail

TIA

Kleigh
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Use the VBA Format function to display a serial date as text.

TextBox1.Text = Format(Range("A1").Value, "dd/mm/yyyy")
 
Upvote 0
Would i be pasting the code within the textboxes afterupdate sub or in the userform initialize sub?

Thank you :)

Kleigh
 
Upvote 0
Would i be pasting the code within the textboxes afterupdate sub or in the userform initialize sub?

Thank you :)

Kleigh

I can't tell from just your broad description. I suppose you use it whenever you want to populate the dates in textboxes. It could be anywhere in the code depending on when you want that to happen.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top