jump to navigation

Membuat Program Error (Run-time error) October 21, 2008

Posted by mkodir in Uncategorized.
trackback

Program Konversi bilangan dan karakter menjadi Octal, Decimal, dan Hexadecimal.

1. Memasukkan bilangan 1

2. Klik optional Octal dan hasilnya sebagai berikut :

Ternyata “Run-time error ‘13’. Kira-kira apakah penyebabnya ?

Berikut syntax program yang dibuat dengan Visual Basic :

Dim currentval As Variant
Private Sub Command1_Click()
End
End Sub

Private Sub Option1_Click()
Text1.Text = Oct(currentval)
End Sub

Private Sub Option2_Click()
Text1.Text = Format(currentval)
End Sub

Private Sub Option3_Click()
Text1.Text = Hex(currentval)
End Sub

Private Sub Text1_Change()
If Option1.Value = True Then
currentval = (“&O” & LTrim(Text1.Text) & “&”)
ElseIf Option2.Value = True Then
currentval = (LTrim(Text1.Text) & “&”)
Else
currentval = (“&H” & LTrim(Text1.Text) & “&”)
End If

End Sub

Advertisement

Comments»

No comments yet — be the first.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.