#7764
Support 1
Participant

    quote:


    I would like to set my TRZDateTimeEdit to this date but I keep getting this error:

    Could not convert variant of type (OleStr) into type (Double) at line 312, column 7


    The above error message indicates that the RzDateTimeEdit property Date requires the type Double, where you are trying to assign a String. You could fix this by assigning date_in instead of t_date_sel. However, the formatted date string t_date (MM/DD/YYYY) could be problematic if your applet runs in a locale other than English-US. Here is an alternative, locale-independent way to retrieve the date:

      t_mth = iRST_Edit("month")
      t_year = IRST_Edit("year")
      CDIP_FRM.MonthEdit.Date = DateSerial(t_year, t_mth, 1) ' VBScript function

    As for selecting the correct ListView item, the expression

      if .Item(I) = t_guideline then

    is comparing a object reference (pointer) with a string. I think the complete if statement should be:

      if .Item(I).Caption = t_guideline then
        .Item(I).selected = true
        exit for
      end if

    I hope this helps.

    Regards,
    Advansys Support