![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 25
|
If I invoke the Excel data form on a workheet range, the controls (fields) on the form correctly mirror any formatting on the database range i.e. number format, date format ("dd/mm/yy") etc.,
However if I try to create a custom UserForm the Textbox controls I add to the form are just that "Textboxes"! How can I capture the contents of the related fields and format them to dates etc. so that they are displayed on the form and written to the worksheet in the desired format? Any help would be greatly appreciated. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
If your date is in say A1, then you could try something like-
TextBox1.Text = Format(Cells(1,1), "dd/mm/yyyy") Try looking up the format function in the Help files for other formats. [ This Message was edited by: Mudface on 2002-02-21 11:26 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|