UserForm Controls -revisited
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: UserForm Controls -revisited

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com