Re: Count data in a Textbox
In the event you want to calculate this, put something like:
Dim fLetters as Single ' This goes just before your sub declaration i.e "private Sub ....."
Dim fCharge as Single
' This assumes there is a label called lblLetters
' and a label called lblCharge
' it also assumes that lblLetters contains the amount of letters in the textbox
fLetters = CSng(lblLetters.Caption) ' get number of letters from label and convert to single
If fLetters >= 100 then
fCharge = 4.20 + ((fLetters - 100) * .02)
End If
Hope that this is something like what you're looking for... if not reply again.
Best of Luck,
slcotten :-)
Re: Count data in a Textbox
private sub command1_click()
dim numLetters as integer
dim amt as single
numLetters = len (text1.text)
amt = 4.2
if numletters >= 100 then
amt = 4.2 + 0.02 * (numletters - 100)
end if
label1.caption = numletters
label2.caption = amt
end sub