0% found this document useful (0 votes)
63 views2 pages

Option: Private Sub Command1 - Click

This document contains code for a temperature conversion application with two conversion options: Fahrenheit to Celsius and Celsius to Fahrenheit. It includes code to get user input for the temperature to convert, perform the conversion calculation based on the selected option, and display the converted temperature. The code also sets properties for labels, text boxes, and buttons used in the application interface.

Uploaded by

Ariel Wilka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Option: Private Sub Command1 - Click

This document contains code for a temperature conversion application with two conversion options: Fahrenheit to Celsius and Celsius to Fahrenheit. It includes code to get user input for the temperature to convert, perform the conversion calculation based on the selected option, and display the converted temperature. The code also sets properties for labels, text boxes, and buttons used in the application interface.

Uploaded by

Ariel Wilka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Option

Private Sub Command1_Click()


Dim TemIn As Double, TEmout As Double
TemIn = Val(Text1.Text)
If (Option1 = True) Then
TEmout = (5 / 9) * (TemIn - 32)
Else
TEmout = (1.8 * TemIn) + 32
End If
Text2.Text = Str(TEmout)
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Option1_Click()
If (Option1.Value = True) Then
Label2.Caption = " Masukan nilai ysng sksn dikonversi ke Fahrenhit "
Text1.Text = " "
Label3.Caption = " ekivalen temteratur in Fahrenhit "
Text2.Text = " "
End If
End Sub
Private Sub Option2_Click()

If (Option2.Value = True) Then


Label2.Caption = " Masukan nilai ysng sksn dikonversi ke Celsius "
Text1.Text = " "
Label3.Caption = " ekivalen temteratur in Celsius "
Text2.Text = " "
End If
End Sub
Objek
Form1
Label1
Label2
Label3
Option1
Option2
Text1
Text2
Command
1
Command
2

Settimg property Objek Yang Digunakan


Property
Value
Caption
Konversi Temperatur
Caption
Konversi Temperatur
Caption
Masukan Temperatur dalam
Fahrenhit
Caption
Ekivalen Temperatur dalam
Celsius
Caption
Fahrenhit To Celsius
Caption
Text
Text
Caption

Celsius To Fahrenhit
kosongan
kosongkan
Konversi

Caption

Keluar

You might also like