Makasih banyak ya Mas Aries. Programnya jadi singkat. Harap maklum masih newbie
jadi logikanya ga bgtu keren. Thx bgt. Boleh ya sourcenya saya pake
aries <[EMAIL PROTECTED]> wrote: wah kalo u
masih pake kode yang seperti ini :
If optButton(1).value = False _
And optButton(2).value = False _
And optButton(3).value = False _
And optButton(4).value = False _
And optButton(5).value = False _
And optButton(6).value = False _
And optButton(7).value = False _
And optButton(8).value = False _
Then
MsgBox "Silahkan Pilih Opsi Terlebih Dahulu", vbCritical, "PERHATIAN"
End If
enggak keliatan manfaat objek optButtonnya di kasih index (array), coba
kodenya di modifikasi sedikit menjadi :
Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
j = 0
For i = optButton.LBound To optButton.UBound
If optButton(i).Value = True Then j = j + 1: Exit For
Next
If j = 0 Then
MsgBox "Silahkan Pilih Opsi Terlebih Dahulu", vbCritical, "PERHATIAN"
Exit Sub
End If
'proses selanjutnya
End Sub
bambang supriadi <[EMAIL PROTECTED]> wrote:
Makasih ya mas. Saya pake logika AND aja ky gini, barusan aj
kepikiran
If optButton(1).value = False _
And optButton(2).value = False _
And optButton(3).value = False _
And optButton(4).value = False _
And optButton(5).value = False _
And optButton(6).value = False _
And optButton(7).value = False _
And optButton(8).value = False _
Then
MsgBox "Silahkan Pilih Opsi Terlebih Dahulu", vbCritical, "PERHATIAN"
End If
Suryo <[EMAIL PROTECTED]> wrote:
di beri index trus di counter dan di check 1 per 1 berdasarkan indexnya mas
----- Original Message -----
From: bambang supriadi
To: [email protected]
Sent: Saturday, May 19, 2007 5:54 PM
Subject: [indoprog-vb] menampilkan pesa error saat tidak ada salah satu option
button yang dipilih?
Mohon maaf pertanyaannya mungkin sangat mudah sekali tapi aku udah nyoba kok
tetep ga bisa. Mohon petunuknya dari sesepuh-sesepuh semuanya. Makasih ya
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
---------------------------------
Give spam the boot. Take control with tough spam protection
in the all-new Yahoo! Mail Beta.
[Non-text portions of this message have been removed]
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on,
when.
[Non-text portions of this message have been removed]
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
[Non-text portions of this message have been removed]