FUNCTION strlen(str)
    dim p_len
    p_len=0
    strlen=0
    p_len=len(str)

    FOR xx=1 to p_len

        IF asc(mid(str,xx,1))<0 then
            strlen=int(strlen) + 2
        ELSE
            strlen=int(strlen) + 1
        END if

    NEXT

END function

FUNCTION myFind( cunname,DJH,SHAPE_Area,lb )
    dim str
    str=SHAPE_Area
    dim d
    d=strlen(str)
    dim d1
    dim d2
    d1=strlen(cunname) /2
    d2=strlen(DJH) /2
    if d2>d1 then
          d1=d2
    end if

     myFind ="　" & space(d-1) &cunname & vbnewline  & str & string(d1, "——") & lb & vbnewline & space(d) & DJH 

END Function

Function FindLabel ([QSDWMC],[TBBH],[DLBM],[shape_area])
  FindLabel = myFind( [TBBH],[DLBM] , [QSDWMC]&" "," 面积为"&round([shape_area],0)&"平方米")
End Function
