Skip to main content

AccessTr.neT


Rastgele Sayı

Rastgele Sayı

#5
[Resim: do.php?img=10603]

Option Compare Database
Dim dic As Object, i As Integer

Private Sub Form_Close()
    Set dic = Nothing
End Sub
Private Sub Form_Load()
    Set dic = CreateObject("Scripting.dictionary")
    Randomize
    For i = 1 To 33
        dic.Add i, i
    Next
End Sub
Private Sub Komut2_Click()
    Dim soru_sayisi
   
10:
    soru_sayisi = Int((33) * Rnd) + 1
    If Not dic.Exists(soru_sayisi) Then GoTo 10
    adj_id.Value = dic(soru_sayisi)
    If dic.Exists(soru_sayisi) Then dic.Remove (soru_sayisi)
    If dic.Count = 0 Then MsgBox "Sayilar Bitti", vbExclamation, "Bitti"
End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Rastgele Sayı - Yazar: Gunalp Gunal - 21/11/2020, 15:14
RE: Rastgele Sayı - Yazar: berduş - 21/11/2020, 16:14
RE: Rastgele Sayı - Yazar: feraz - 21/11/2020, 16:19
RE: Rastgele Sayı - Yazar: berduş - 21/11/2020, 16:29
RE: Rastgele Sayı - Yazar: feraz - 21/11/2020, 17:12
RE: Rastgele Sayı - Yazar: berduş - 21/11/2020, 20:19
RE: Rastgele Sayı - Yazar: alicimri - 21/11/2020, 22:50
Task