Dim I As Integer
Dim str As String
Dim sz As Integer
Private Sub cmd_asc_Click()
i = Asc(Txtdata.Text)
MsgBox "ASC value is "&i
End Sub
Private Sub cmd_chr_Click()
str = Chr(Val(Txtdata.Text))
MsgBox "value is "&str
End Sub
Private Sub cmd_lcase_Click()
str = LCase(Txtdata.Text)
MsgBox "L case text is "&str
End Sub
Private Sub cmd_left_Click()
Dim sz As Integer
sz = InputBox("enter size:")
str = Left(Txtdata.Text, sz)
MsgBox "Left part of string is
"&str
End Sub
Private Sub cmd_len_Click()
i = Len(Txtdata.Text)
MsgBox" lenth is " &i
End Sub
Private Sub Cmd_right_Click()
Dim sz As Integer
sz = InputBox("enter size:")
str = Left(Txtdata.Text, sz)
MsgBox "Left part of string is
"&str
MsgBox" left part is " &str
End Sub
Private Sub cmd_ucase_Click()
str = UCase(Txtdata.Text)
MsgBox "L case text is "&str
End Sub
Private Sub Command1_Click()
For j = 1 To 5
i = 25 * Rnd
MsgBoxi
Next
End Sub
Private Sub Command10_Click()
d = Sgn(Val(Txtdata.Text))
MsgBox " valis : " & d
End Sub
Private Sub Command2_Click()
d = Log(Val(Txtdata.Text))
MsgBox "log valis : " & d
End Sub
Private Sub cmdasc_Click()
i = Asc(Txtdata.Text)
MsgBox "Asc value is "&i
End Sub
Private Sub Cmdltrim_Click()
str = LTrim(Txtdata.Text)
MsgBox "String is: "
&Txtdata.Text
MsgBox "After Trim String is: "
&str
End Sub
Private Sub Cmdmid_Click()
Dim start, sz As Integer
start = InputBox("enter starting
point:")
sz = InputBox("enter size:")
str = Mid(Txtdata.Text, start, sz)
MsgBox "Mid part of string is
"&str
End Sub
Private Sub Cmdrtrim_Click()
str = LTrim(Txtdata.Text)
MsgBox "String is: "
&Txtdata.Text
MsgBox "After Trim String is: "
&str
End Sub
Private Sub Cmdspace_Click()
MsgBoxTxtdata.Text&Space(10) &
Text1.Text
End Sub
Private Sub cmdstring_Click()
str = String(20, "*$hbh")
MsgBoxstr
End Sub
Private Sub Cmdstringcomp_Click()
i = StrComp(Txtdata.Text, Text1.Text,
vbBinaryCompare)
MsgBoxi
End Sub
Private Sub Cmdtrim_Click()
str = Trim(Txtdata.Text)
MsgBox "String is: "
&Txtdata.Text
MsgBox "After Trim String is: "
&str
End Sub
Private Sub Command5_Clic()
d = Exp(Val(Txtdata.Text))
MsgBox "Absolute valis : " & d
End Sub
Private Sub Command6_Click()
i = Abs(Val(Txtdata.Text))
trMsgBox "absolute value is :"
& 1
For i = 1 To 10
i = Rnd(10)
MsgBox 1
Next
End Sub
Private Sub Command8_Click()
d = Log(Val(Txtdata.Text))
MsgBox " valis : " & d
End Sub
OUTPUT:
Post a Comment