+ Reply to Thread
Results 1 to 2 of 2

DateSeriial in Sub Routines

  1. #1
    Registered User
    Join Date
    10-23-2006
    Posts
    84

    DateSeriial in Sub Routines

    I have a UserForm that uses 3 textboxes for Day,Month and Year. I can't find any way to use the inputs from these boxes to format the input date as DateSerial, only accepts numbers and not text. I,ve tried txtDay.Text = txtDay.Value etc but it is invalid. Can't find a way to convert from text to numeric. Can anybody help please?

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    You can adjust following instruction to your needs ...

    txtFrom.Value = Format(DateSerial(Year(Calendar1.Value), Month(Calendar1.Value), Day(Calendar1.Value)), "Short Date")

    HTH
    Carim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1