Professional Documents
Culture Documents
LEAP YEAR
Dim i, j, k As Integer
Dim sir As String
Private Sub Cmd_reset_Click()
Unload Me
End Sub
k = List1.ListIndex
If k = 0 Then
txt_days.Text = 31
ElseIf k = 1 Then
txt_days.Text = 29
ElseIf k = 2 Then
txt_days.Text = 31
ElseIf k = 3 Then
txt_days.Text = 30
ElseIf k = 4 Then
txt_days.Text = 31
ElseIf k = 5 Then
txt_days.Text = 30
ElseIf k = 6 Then
txt_days.Text = 31
ElseIf k = 7 Then
txt_days.Text = 31
ElseIf k = 8 Then
txt_days.Text = 30
ElseIf k = 9 Then
txt_days.Text = 31
ElseIf k = 10 Then
txt_days.Text = 30
Else
txt_days.Text= 31
End If
Else
MsgBox "year" & txt_year.Text & "is not a leap year", vbOKOnly, "leap year"
k = List1.ListIndex
If k = 0 Then
txt_days.Text = 31
ElseIf k = 1 Then
txt_days.Text = 28
ElseIf k = 2 Then
txt_days.Text = 31
ElseIf k = 3 Then
txt_days.Text = 30
ElseIf k = 4 Then
txt_days.Text = 31
ElseIf k = 5 Then
txt_days.Text = 30
ElseIf k = 6 Then
txt_days.Text = 31
ElseIf k = 7 Then
txt_days.Text = 31
ElseIf k = 8 Then
txt_days.Text = 30
ElseIf k = 9 Then
txt_days.Text = 31
ElseIf k = 10 Then
txt_days.Text = 30
Else
txt_days.Text= 31
End If
End If
End Sub
OUTPUT
EMPLOYEE DETAILS
Dim i As Integer
Private Sub Form_Load()
List1.AddItem "DOLLAR"
List1.AddItem "YURO"
List1.AddItem "DINAR"
List1.AddItem "DOLLAR1"
End Sub
Option Explicit
Dim v1, v2, v3, res, opt, flag As Integer
Private Sub cmd_num_Click(Index As Integer)
If flag = True Then
txt_res.Text = " "
flag=False
End If
txt_res.Text = txt_res.Text & (Index)
End Sub
End If
Adodc1.Recordset.Fields(3) = txt_curramt.Text
End Sub
Dim s As String
Dim no As Integer
Dim r As Integer
Dim ano As Integer
Public Property Get ams() As String Static s As Integer
s=0
no = InputBox("Enter The Number","ArmstrongNumber")
ano = Val(no) Do While (Val(no) > 0) r = Val(no) Mod 10
s = s + (r ^ 3) no = Fix(Val(no) / 10)
Loop
If (ano = s) Then
ams = ano & " Is An Armstrong Number " Else
ams = ano & " Is Not An Armstrong Number"
End If
End Property
End Property
Public Property Get sdigits() As String Dim
no, s, i, r As Integer
no = InputBox("Enter The Number", "Sum Of Digits")
Do While
(no > 0) r = no Mod 10 no = Fix(no / 10) s =s + r
Loop
sdigits = "The Sum Of Digits" & s
End Property
Clipboard.SetText (RichTextBox1.SetText)
End Sub
Clipboard.setTextRichTextBox1.SetText)
Clipboard.SetText (RichTextBox1.SetText)
End Sub
RichTextBox1.Text = ""
End Sub
RichTextBox1.Text = ""
End Sub
CommonDialog1.ShowOpen
RichTextBox1.FileName = CommonDialog1.FileName
End Sub
RichTextBox1.SetText = Clipboard.SetText
End Sub
s1 = Trim(RichTextBox1.Text)
s2 = InputBox("find what", "search")
End Sub
CommonDialog1.ShowSave
RichTextBox1.SaveFile CommonDialog1.FileName
End Sub
OUTPUT