- Katılım
- 6 Ocak 2007
- Mesajlar
- 80
- Excel Vers. ve Dili
- excell2000
Progressbar ı aşağıdaki makroma nasıl uyarlarım yapmak istediğim şey eğer comboboxlarda değer seçili değilse progressbar çalışmasın msgbox devreye girsin istiyorum ama makromun neresine ve nasıl eklerim bilmiyorum veya uygulanabilirmi?Bununla ilgili örneklerede baktım ancak yapamadım malesef.Tşk ediyorum şimdiden.
Private Sub CommandButton1_Click()
On Error Resume Next
son = [A65536].End(3).Row
ListBox1.AddItem
ListBox1.List(0, 0) = WorksheetFunction.Round(Evaluate("=SUMPRODUCT((A6:A" & son & ">=" & CLng(CDate(DTPicker1)) & ")*(A6:A" & son & "<=" & CLng(CDate(DTPicker2)) & ")*(F6:F" & son & "=" & """" & ComboBox4 & """" & _
")*(C6:C" & son & "=" & ComboBox5 & ")*(G6:G" & son & "=" & ComboBox6 & ")*(H6:H" & son & "=" & ComboBox3 & ")*(E6:E" & son & "))"), 0)
ListBox1.List(0, 1) = WorksheetFunction.Round(Evaluate("=SUMPRODUCT((A6:A" & son & ">=" & CLng(CDate(DTPicker1)) & ")*(A6:A" & son & "<=" & CLng(CDate(DTPicker2)) & ")*(F6:F" & son & "=" & """" & ComboBox4 & """" & _
")*(C6:C" & son & "=" & ComboBox5 & ")*(G6:G" & son & "=" & ComboBox6 & ")*(H6:H" & son & "=" & ComboBox3 & ")*(J6:J" & son & "))"), 2)CLng(CDate(DTPicker1)) & ")*(A3:A" & son & "<=" & CLng(CDate(DTPicker2)) & ")*(AM3:AM" & son & "))"), 0)
TextBox23 = WorksheetFunction.Round(Replace(ListBox6.List(0, 0) / ListBox5.List(0, 0), ".", ","), 2)
TextBox24 = WorksheetFunction.Round(Replace(ListBox6.List(0, 1) / ListBox5.List(0, 0), ".", ","), 2)
ProgressBar1.Visible = True
Dim i As Integer
For i = 1 To 1000
ProgressBar1.Value = (i / 1000) * 100
Label10.Caption = Format(Int((i / 1000) * 100), "%0")
DoEvents
Next i
MsgBox "Veriler Aktarıldı!!!"
ProgressBar1.Visible = False
End Sub
Private Sub CommandButton1_Click()
On Error Resume Next
son = [A65536].End(3).Row
ListBox1.AddItem
ListBox1.List(0, 0) = WorksheetFunction.Round(Evaluate("=SUMPRODUCT((A6:A" & son & ">=" & CLng(CDate(DTPicker1)) & ")*(A6:A" & son & "<=" & CLng(CDate(DTPicker2)) & ")*(F6:F" & son & "=" & """" & ComboBox4 & """" & _
")*(C6:C" & son & "=" & ComboBox5 & ")*(G6:G" & son & "=" & ComboBox6 & ")*(H6:H" & son & "=" & ComboBox3 & ")*(E6:E" & son & "))"), 0)
ListBox1.List(0, 1) = WorksheetFunction.Round(Evaluate("=SUMPRODUCT((A6:A" & son & ">=" & CLng(CDate(DTPicker1)) & ")*(A6:A" & son & "<=" & CLng(CDate(DTPicker2)) & ")*(F6:F" & son & "=" & """" & ComboBox4 & """" & _
")*(C6:C" & son & "=" & ComboBox5 & ")*(G6:G" & son & "=" & ComboBox6 & ")*(H6:H" & son & "=" & ComboBox3 & ")*(J6:J" & son & "))"), 2)CLng(CDate(DTPicker1)) & ")*(A3:A" & son & "<=" & CLng(CDate(DTPicker2)) & ")*(AM3:AM" & son & "))"), 0)
TextBox23 = WorksheetFunction.Round(Replace(ListBox6.List(0, 0) / ListBox5.List(0, 0), ".", ","), 2)
TextBox24 = WorksheetFunction.Round(Replace(ListBox6.List(0, 1) / ListBox5.List(0, 0), ".", ","), 2)
ProgressBar1.Visible = True
Dim i As Integer
For i = 1 To 1000
ProgressBar1.Value = (i / 1000) * 100
Label10.Caption = Format(Int((i / 1000) * 100), "%0")
DoEvents
Next i
MsgBox "Veriler Aktarıldı!!!"
ProgressBar1.Visible = False
End Sub
Son düzenleme: