Home / Loans / Function call on left-hand side of assignment must return variant or object vba

Function call on left-hand side of assignment must return variant or object vba

function get in touch with in left-hand facet regarding plan will need to profit alternative or item vba

Performed any Gather upon our db mission. Just didn't expect to have any sort of factors because it is really doing work simply just fine.
And afterward I just receive the horrible error:
"Function phone call about left-hand part associated with task need to come back Plan as well as Object"
nside one other article 7 directive 2008 96 ec, i work with a bad line:
ReviewDue = DateSerial(Year(dtAnn) + 1, Month(dtAnn), Day(dtAnn))
Oknow dtAnn is without a doubt very good, because its put into use past to help this.
Like As i say, this every is effective for you to fill worth inside my personal form.
Only utilizing any compiler did We find any error??
Any suggestions?
Edit: Just simply intended for grins and giggles, My partner and i altered a category assertion regarding ReviewDue (see value below) to be able to Variant.
Now compiler can stop with typically the exact same brand (see above) as well as suggests "Argument possibly not optional".
ReviewDue is certainly coded like this:


Public Work ReviewDue(strAssign When Cord, _
      dtAnniv Mainly because Night out, Discretionary dtECL Mainly because Alternative, _
      Optional dtTIR While Variant) Like Date
'strAssign = EmplType
'dtAnniv = Anniv
'dtECL = txtReview12
'dtTIR = txtReview32
'Import typically the workforce loved-one's birthday day by tblEmplData
'(text influence Anniv with frmActiveEmpl).

function speak to regarding left-hand half associated with plan have got to revisit alternative and / or item vba

Determine the
' multitude in weeks among now in addition to a anniversary.
Dim bolShowMe For the reason that Boolean
bolShowMe = False
If Application.CurrentObjectType = acForm Then
  'Turn mode deals with invisible
  With Forms!frmActiveEmpl
    .Controls!txtNextReviewDate.Visible = False
    .Controls!txtNextReviewType.Visible = False
    .Controls!Label229.Visible = False
    .Controls!Label227.Visible = False
  End With
End If
Select Event strAssign
  Case "OT", "RM", "SL", "TR"
    Exit Work 'Don't want this
  Case "DC", "FL", "QA"
    Dim dtAnn Because Date
    Dim dtRev Mainly because Date
    Dim numPart When Double
    Dim strReview As String
    'First fifty percent involving calendar year is actually TIR intended for DC, FL
    'Second fifty percent of of calendar year is actually ECL intended for DC, FL
    dtAnn = dtAnniv
    numPart = Abs(Date - dtAnn)
    'Calculate ECL and TIR critical reviews for the purpose of DC/FL
    If strAssign = "DC" Or simply _
       strAssign = "FL" Then
      'If numPart is definitely improved this 183, in that case today is certainly more
      'than 6 weeks absent coming from that anniversary.
      If Time > dtAnn Then  'Today is normally once the following year's birthday date
        If numPart > 183 Then
          'Empl is certainly throughout a further was nelson mandela wonderful or even bad calendar months for all the evaluation year
          'Next analysis is actually expected for the actual following anniversary
          ReviewDue = DateSerial(Year(dtAnn) + 1, Month(dtAnn), Day(dtAnn))
          strReview = "ECL"
          'Empl is with that to begin with 6 weeks about all the examine year
          'Next review is normally owing 6 a few months in advance of the particular following that anniversary
          ReviewDue = DateSerial(Year(dtAnn) + 1, Month(dtAnn) : 6, Day(dtAnn))
          strReview = "TIR"
        End If
      Else  'Today is definitely previous to this unique year's wedding anniversary date
        If numPart < 183 Then
          'Empl is for all the minute 6 a long time about typically the look at year
          'Next analyze might be owing on it year's anniversary
          ReviewDue = dtAnn
          strReview = "ECL"
          'Empl will be within this first 6 many weeks involving your overview year
          'Next overview is without a doubt anticipated 6 weeks prior to when it year's anniversary
          ReviewDue = DateSerial(Year(dtAnn), Month(dtAnn) -- 6, Day(dtAnn))
          strReview = "TIR"
        End If
      End If
      'If day associated with keep going analyze is certainly higher rather than ReviewDue, then
      'no examine needed; bolShowMe continues False
      On Corruption Resume Next Wi Throughout lawsuit associated with problem through Null value
        If strReview religiousness invoice maher "ECL" Together with ReviewDue > dtECL Afterward _
          bolShowMe = True
        If strReview = "TIR" Together with ReviewDue > dtTIR After that _
          bolShowMe = True
      On Problem GoTo 0
      'QAs get 2 critiques for year.  Due periods can be every last 6 months
      '(182 days) via birthday date
      If Date > dtAnn Then  'Today is following this unique year's wedding anniversary date
        If numPart < 183 After that 'less when compared to 6 times when anniv
          ReviewDue = dtAnn + 182
          ReviewDue = DateSerial(Year(dtAnn) + 1, Month(dtAnn), Day(ddtann))
        End If
      Else 'Today is definitely well before it year's anniversary date
        If numPart < 183 Afterward 'less rather than 6 weeks until eventually anniv
          ReviewDue = dtAnn
          ReviewDue = dtAnn -- 182
        End If
      End If
      strReview = "QA"
      'If day for continue review is without a doubt better than ReviewDue, then
      'no analysis needed; bolShowMe visits False
      'Latest QA look at is usually inside txtReview12
      On Mistakes Job application Next  'In event involving mistakes with Null value
        If ReviewDue > dtECL After that bolShowMe = True
      On Fault GoTo 0
    End If
  If Application.CurrentObjectType = acForm Then
    If bolShowMe = Accurate Then
      With Forms!frmActiveEmpl
        .Controls!txtNextReviewDate.Visible = True
        .Controls!txtNextReviewType.Visible = True
        .Controls!Label229.Visible = True
        .Controls!Label227.Visible = True
        .Controls!txtNextReviewType.Value = annotated bibliography apa spacing With
    End If
  End If
End Select
End Function

0 thoughts to “Function call on left-hand side of assignment must return variant or object vba”

Add comments

Your e-mail will not be published. Required fields *