Progress Bar A YÜzde Sİmgesİ Eklemek İstİyorum Tamamlanma GÖstergesİnİn Tam Ortasinda Onunla Beraber Kaysin İstİyorum.. Şu Atraksİyonlu Olan Varya Ondan.. Label Ekleyİp Yapilabİlİr Ama Hazir Örnek Varmi Dİye Sorayim Dedİm..
TŞk..
TŞk..
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim BckCtrl As Control, MyCtrl As Control, CountCtrl As Control
Dim i As Double, say As Double
Dim Start As Long, Finish As Long
Columns("A").ClearContents
'
Set BckCtrl = Controls.Add("Forms.Label.1", "BckCtrl")
BckCtrl.Left = Me.Width * 0.05
BckCtrl.Height = 13
BckCtrl.Width = Me.Width * 0.9
BckCtrl.Top = Me.Height - BckCtrl.Height
BckCtrl.BackColor = &H8000000F
BckCtrl.SpecialEffect = 2
'
Set MyCtrl = Controls.Add("Forms.Label.1", "MyCtrl")
MyCtrl.Left = Me.Width * 0.05
MyCtrl.Height = 10
MyCtrl.Width = 0
MyCtrl.Top = Me.Height - MyCtrl.Height - 0.95
Me.Height = Me.Height + 25
MyCtrl.Caption = ""
MyCtrl.BackColor = &H8000000D
'
Set CountCtrl = Controls.Add("Forms.Label.1", "CountCtrl")
CountCtrl.Left = (BckCtrl.Left + BckCtrl.Width) / 2
CountCtrl.Height = 12
CountCtrl.Width = 40
CountCtrl.Top = BckCtrl.Top * 1.01
CountCtrl.TextAlign = fmTextAlignLeft
CountCtrl.Font.Bold = True
CountCtrl.BackStyle = Transparent
'
say = 6000
Start = Timer
For i = 1 To say
MyCtrl.Width = (BckCtrl.Width * 0.993) / say * i
If MyCtrl.Width >= BckCtrl.Width / 2 Then CountCtrl.ForeColor = &H8000000E
DoEvents
CountCtrl.Caption = Int(i / say * 100) & " %"
Cells(i, 1) = i
Next i
Finish = Timer
MsgBox "Toplam süre : " & Finish - Start & " saniye"
'
Me.Height = Me.Height - 20
Columns("A").ClearContents
Me.Controls.Remove "BckCtrl"
Me.Controls.Remove "MyCtrl"
Me.Controls.Remove "CountCtrl"
'
Set BckCtrl = Nothing
Set MyCtrl = Nothing
Set CountCtrl = Nothing
'
End Sub
teşekkürler Zeki bey verdiğiniz linki incelemiştim zaten diğer örneklere de bakmaya çalıştım ama çoğu forumdan silinmiş
korhan hocam örnek dosyanız duruyorsa foruma eklemeniz mümkün mü?Selamlar,
Ekteki örnek dosyayı incelermisiniz.
sayın Haluk beyin örnek çalışması forumdan silinmiş faydalı olur düşüncesiyle tekrar ekledimUserForm üzerine CommandButton1'i yerleştirin ve;
Kod:Private Sub CommandButton1_Click() Dim BckCtrl As Control, MyCtrl As Control, CountCtrl As Control Dim i As Double, say As Double Dim Start As Long, Finish As Long Columns("A").ClearContents ' Set BckCtrl = Controls.Add("Forms.Label.1", "BckCtrl") BckCtrl.Left = Me.Width * 0.05 BckCtrl.Height = 13 BckCtrl.Width = Me.Width * 0.9 BckCtrl.Top = Me.Height - BckCtrl.Height BckCtrl.BackColor = &H8000000F BckCtrl.SpecialEffect = 2 ' Set MyCtrl = Controls.Add("Forms.Label.1", "MyCtrl") MyCtrl.Left = Me.Width * 0.05 MyCtrl.Height = 10 MyCtrl.Width = 0 MyCtrl.Top = Me.Height - MyCtrl.Height - 0.95 Me.Height = Me.Height + 25 MyCtrl.Caption = "" MyCtrl.BackColor = &H8000000D ' Set CountCtrl = Controls.Add("Forms.Label.1", "CountCtrl") CountCtrl.Left = (BckCtrl.Left + BckCtrl.Width) / 2 CountCtrl.Height = 12 CountCtrl.Width = 40 CountCtrl.Top = BckCtrl.Top * 1.01 CountCtrl.TextAlign = fmTextAlignLeft CountCtrl.Font.Bold = True CountCtrl.BackStyle = Transparent ' say = 6000 Start = Timer For i = 1 To say MyCtrl.Width = (BckCtrl.Width * 0.993) / say * i If MyCtrl.Width >= BckCtrl.Width / 2 Then CountCtrl.ForeColor = &H8000000E DoEvents CountCtrl.Caption = Int(i / say * 100) & " %" Cells(i, 1) = i Next i Finish = Timer MsgBox "Toplam süre : " & Finish - Start & " saniye" ' Me.Height = Me.Height - 20 Columns("A").ClearContents Me.Controls.Remove "BckCtrl" Me.Controls.Remove "MyCtrl" Me.Controls.Remove "CountCtrl" ' Set BckCtrl = Nothing Set MyCtrl = Nothing Set CountCtrl = Nothing ' End Sub