washytonn 9/7/2012, 14:53
quando digito dois valores, dar um erro no modulo abaixo:
Private Sub HandleNumberClick(strNum As String)
Dim varCaption As Variant
Dim varLen As Variant
If LastInput <> csStateNums Then
lblReadOut.Caption = ""
DecimalFlag = False
End If
varCaption = lblReadOut.Caption
varLen = Len(varCaption)
lblReadOut.Caption = lblReadOut.Caption & strNum
If varLen > 0 And Left$(varCaption, 1) = "0" And InStr(varCaption, ".") = 0 Then
lblReadOut.Caption = Mid$(lblReadOut.Caption, 2)
End If
LastInput = csStateNums
End Sub
o erro que aparecer é exatamente nessa parte:
If varLen > 0 And Left$(varCaption, 1) = "0" And InStr(varCaption, ".") = 0 Then
lblReadOut.Caption = Mid$(lblReadOut.Caption, 2)