-
- Destek
-
-
Özel Arama
![]() |
Private Sub CommandButton1_Click()
Dim veriler, son, i%, ii&, temp$, x&
x = Val(TextBox1.Value)
If Not x > 0 Then
MsgBox "Sıfırdan büyük bir sayı giriniz.", vbCritical
Exit Sub
End If
With Sheets("Sayfa1")
son = .Cells(Rows.Count, 2).End(3).Row
If x > son - 1 Then x = son - 1
If son = 1 Then
MsgBox "Hiçbir Metin Bulunamadı.", vbCritical
Exit Sub
End If
veriler = .Range("A1:B" & son).Value
End With
For i = 1 To 10
For ii = 1 To UBound(veriler)
r1 = WorksheetFunction.RandBetween(1, UBound(veriler))
temp = veriler(ii, 2)
veriler(ii, 2) = veriler(r1, 2)
veriler(r1, 2) = temp
Next ii
Next i
With Sheets("Sayfa2")
son = .Cells.ClearContents
.Range("A1:B" & x + 1).Value = veriler
End With
MsgBox "İşlem Tamam", vbOKOnly, "Bilgi"
End Sub
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 1 misafir