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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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