Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

20 Ekim 2008 Pazartesi

Twelve-Level Progress Account



'UserForm1

'Add Tools on UserForm1: ProgressBar1....12, Label1....16, CommandButton1, Image1, Label17
Option Explicit
Dim i As Long
Dim ii As Long
Dim iii As Long
Dim iv As Long
Dim v As Long
Dim vi As Long
Dim vii As Long
Dim viii As Long
Dim ix As Long
Dim x As Long
Dim xi As Long
Dim xii As Long

Private Sub UserForm_Initialize()
On Error GoTo Hata
Me.Caption = "[PBİD®] Twelve-Level Progress Account..."
ProgressBar1.Max = 12: ProgressBar1.Min = 1
ProgressBar2.Max = 11: ProgressBar2.Min = 1
ProgressBar3.Max = 10: ProgressBar3.Min = 1
ProgressBar4.Max = 9: ProgressBar4.Min = 1
ProgressBar5.Max = 8: ProgressBar5.Min = 1
ProgressBar6.Max = 7: ProgressBar6.Min = 1
ProgressBar7.Max = 6: ProgressBar7.Min = 1
ProgressBar8.Max = 5: ProgressBar8.Min = 1
ProgressBar9.Max = 4: ProgressBar9.Min = 1
ProgressBar10.Max = 3: ProgressBar10.Min = 1
ProgressBar11.Max = 2: ProgressBar11.Min = 1
ProgressBar12.Max = 1: ProgressBar12.Min = 1
Hata:
End Sub
Private Sub CommandButton1_Click()
On Error GoTo Hata
Label13.Caption = VBA.Format(Now, "hh:mm:ss")
For i = 1 To 12
ProgressBar1.Value = i: Label1.Caption = "%" & VBA.Round((i / 12) * 100, 2): DoEvents
For ii = 1 To 11
ProgressBar2.Value = ii: Label2.Caption = "%" & VBA.Round((ii / 11) * 100, 2): DoEvents
For iii = 1 To 10
ProgressBar3.Value = iii: Label3.Caption = "%" & VBA.Round((iii / 10) * 100, 2): DoEvents
For iv = 1 To 9
ProgressBar4.Value = iv: Label4.Caption = "%" & VBA.Round((iv / 9) * 100, 2): DoEvents
For v = 1 To 8
ProgressBar5.Value = v: Label5.Caption = "%" & VBA.Round((v / 8) * 100, 2): DoEvents
For vi = 1 To 7
ProgressBar6.Value = vi: Label6.Caption = "%" & VBA.Round((vi / 7) * 100, 2): DoEvents
For vii = 1 To 6
ProgressBar7.Value = vii: Label7.Caption = "%" & VBA.Round((vii / 6) * 100, 2): DoEvents
For viii = 1 To 5
ProgressBar8.Value = viii: Label8.Caption = "%" & VBA.Round((viii / 5) * 100, 2): DoEvents
For ix = 1 To 4
ProgressBar9.Value = ix: Label9.Caption = "%" & VBA.Round((ix / 4) * 100, 2): DoEvents
For x = 1 To 3
ProgressBar10.Value = x: Label10.Caption = "%" & VBA.Round((x / 3) * 100, 2): DoEvents
For xi = 1 To 2
ProgressBar11.Value = xi: Label11.Caption = "%" & VBA.Round((xi / 2) * 100, 2): DoEvents
For xii = 1 To 1
ProgressBar12.Value = xii: Label12.Caption = "%" & VBA.Round((xii / 1) * 100, 2): DoEvents
Next xii
Next xi
Next x
Next ix
Next viii
Next vii
Next vi
Next v
Next iv
Next iii
Next ii
Next i
Label14.Caption = VBA.Format(Now, "hh:mm:ss")
Hata:
End Sub

Hiç yorum yok:

Blog Arşivi

Bu gadget'ta bir hata oluştu

Bu Blogda Ara

Contributor

Contributor
Mustafa ULUSARAÇ İstanbul, TÜRKİYE
free counters
T. C. Central Bank Indicative Exchange Rates
Currency Exchange Rate Widget,Currency Converter Widget
Borsa İstanbul