makrom yavaş çalışıyor

akd

Destek Ekibi
Destek Ekibi
Katılım
14 Ağustos 2004
Mesajlar
1,114
Excel Vers. ve Dili
2003
Merhaba arkadaşlar,
aşağıda yazacağım makrom çok fonksiyonlu olduğu için yavaş çalışıyor.
Bu kodu hızlandırmak için ne yapabilirim.
Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox3.Value = "" Then
MsgBox "Lütfen bir Paraametre giriniz", vbExclamation
Exit Sub
End If
Dim q As Single, w As Single, t As Single, e As Single, r As Single
q = WorksheetFunction.Index(Sheets("oranlar").Range("b3:m40"), ComboBox15.ListIndex + 1, ComboBox16.ListIndex + 1)
w = WorksheetFunction.Index(Sheets("oranlar").Range("b3:m40"), ComboBox1.ListIndex + 1, ComboBox2.ListIndex + 1)
t = (q / w)
e = (q / ((q + w) / 2))
r = (((TextBox13.Text - TextBox14.Text) / (TextBox14.Text) + 1)) * 1
If CheckBox1.Value = True Then
TextBox26.Text = r
ElseIf CheckBox2.Value = True Then
TextBox26.Text = e
Else
TextBox26.Text = t
End If

Range("a1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select

Loop
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1
ActiveCell.Offset(0, 1).Value = alt_kodu
ActiveCell.Offset(0, 2).Value = TextBox3.Value
ActiveCell.Offset(0, 3).Value = TextBox2.Text * 1
ActiveCell.Offset(0, 4).Value = ComboBox3.Value
ActiveCell.Offset(0, 5).Value = ComboBox1.Value
ActiveCell.Offset(0, 6).Value = ComboBox2.Value
ActiveCell.Offset(0, 8).Value = TextBox17.Text * 1
If CheckBox1.Value = True Then
ElseIf ComboBox3.Value = "Parasal değil" = True Then
ActiveCell.Offset(0, 7).Value = TextBox26.Text * TextBox17.Text
Else
ActiveCell.Offset(0, 7).Value = TextBox17.Text
End If
If CheckBox2.Value = True Then
ElseIf ComboBox3.Value = "Parasal değil" = True Then
ActiveCell.Offset(0, 7).Value = (TextBox26.Text * TextBox17.Text)
Else
ActiveCell.Offset(0, 7).Value = TextBox17.Text
End If
'HARAKETLİ AÐIRLIKLI
If CheckBox4.Value = True Then
ActiveCell.Offset(0, 7).Value = (TextBox31.Text * TextBox17.Text)
End If
TextBox3.Value = ""
TextBox2.Text = ""
TextBox17.Text = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox26.Text = ""
CheckBox2.Value = ""
CheckBox1.Value = ""
TextBox13.Value = ""
TextBox14.Value = ""
TextBox16.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox25.Value = ""
TextBox18.Value = ""
TextBox23.Value = ""
TextBox19.Value = ""
TextBox24.Value = ""
OptionButton1.Value = ""
OptionButton2.Value = ""
CheckBox4.Value = ""
CommandButton22_Click
TextBox3.SetFocus
End Sub
selamlar...
 
Katılım
7 Temmuz 2004
Mesajlar
1,141
dosyayı gönderebilir misiniz?
 
Üst