+ Reply to Thread
Results 1 to 4 of 4

Date Time Picker : Error 35788

Hybrid View

  1. #1
    cosmoKen
    Guest

    Date Time Picker : Error 35788

    Hi,

    In a Excel VBA macro, I have a Date Time Picker from which I want to
    read and write dates.

    Properties of my DTPicker control :

    ..customformat =3D "dd/MM/yyyy"
    ..checkbox =3D true


    Sub save_detail()
    Dim MyDate As Date
    [=2E..]
    If IsDate(MainForm.txtMepDate.value) Then
    MyDate =3D CDate(MainForm.txtMepDate.value)
    Worksheets("donnees").Cells(flux_line, 50).value =3D MyDate
    Else
    Worksheets("donnees").Cells(flux_line, 50).value =3D ""
    End If
    [=2E..]
    End Sub

    Sub init_detail(selected_flux As String)
    Dim MyDate As Date
    [=2E..]
    If IsDate(Worksheets("donnees").Cells(flux_line, 50).value)
    Then
    MyDate =3D CDate(Worksheets("donnees").Cells(flux_line,
    50).value)
    MainForm.txtMepDate.value =3D MyDate
    Else
    MainForm.txtMepDate.value =3D Null
    End If

    [=2E..]
    End Sub


    The part "save_detail" works good : I find in my workbook cell a valid
    date "dd/MM/yyyy hh:mm:ss"

    But for the init_detail, it works good until I close the workbook and
    reopen it.
    Values saved before I close the workbook cannot be set with
    init_detail, I have the error :

    Error n=B035788 : "An error occured in a call to the Windows Date and
    Time Picker control"


    I have tried many things I have read (window visible, change custom
    format, etc.) but no solution.


    Thanks for help


  2. #2
    cosmoKen
    Guest

    Re: Date Time Picker : Error 35788

    I found the solution of my own question :

    Just before setting the value, it has to be visible.
    So, because I'm in a multipage control, I add before :
    Me.multiPage1.value=1 '1 is the tab index where the DTPicker is placed

    Thanks me


  3. #3
    Registered User
    Join Date
    06-29-2011
    Location
    Lisbon
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Date Time Picker : Error 35788

    And thank you

  4. #4
    Registered User
    Join Date
    04-15-2019
    Location
    Türkiye
    MS-Off Ver
    2010
    Posts
    1

    Re: Date Time Picker : Error 35788

    And thank you +1

+ 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