simple problem with addition of strings

Results 1 to 4 of 4

Thread: simple problem with addition of strings

  1. #1
    genic Guest

    Default simple problem with addition of strings

    ok...i know this is freaking simple...but its not working for me. can anyone find what i might be doing wrong?<BR><BR>strUncategorizedHours1 = cint(strAnalysisHours) + cint(strDevelopmentHours) + cint(strEnhancementsHours) + cint(strBreakfixHours) + cint(strMeetingHours) + cint(strTimeOffHours) <BR>strUncategorizedHours = cint(strAllocatedHours) - strUncategorizedHours1<BR><BR>what i am trying to do is add up the 6 strings for a total...and then taking that total and subracting it from another

  2. #2
    RDM Guest

    Default CINT

    put a CInt() around the last strUncategorizedHours1<BR><BR>That variable is still a variant...

  3. #3
    genic Guest

    Default only thing is

    only thing is that sometimes the value might be a .5 and not a whole number

  4. #4
    RDM Guest

    Default Concept still applies

    You&#039;ll want to pick the appropriate VBScript function to convert your values as needed. I would look at CDbl() and see if that doesn&#039;t do the trick. <BR><BR>The math portion of your question really relates to variants and you won&#039;t always get the correct math result if you don&#039;t convert the values being compared.

Posting Permissions

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