- Katılım
- 15 Ağustos 2009
- Mesajlar
- 512
- Excel Vers. ve Dili
- Excel Vers. ve Dili : Ofis 2016 Tr
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
If ComboBox1 = "A" Then Cells(i, 5) = CDbl(TextBox3.Value)
If ComboBox1 = "B" Then Cells(i, 6) = CDbl(TextBox3.Value)
Önceki gün buna benzer bir sorunuza yanıt vermiştim. Sanırım uyarlama yapamadınız.
Aşağıdaki satırları deneyin.
Kod:If ComboBox1 = "A" Then Cells(i, 5) = CDbl(TextBox3.Value) If ComboBox1 = "B" Then Cells(i, 6) = CDbl(TextBox3.Value)
Private Sub CommandButton1_Click()
If ComboBox2.Value = "" Or _
TextBox1.Value = "" Or _
(TextBox2.Value = "" And _
TextBox2.Value = "") Then
MsgBox "Boş Bırakamazsınız", vbCritical, "DİKKAT"
TextBox2.SetFocus
Exit Sub
End If
Dim i As Long, j As Byte, Tar As Date
i = Cells(Rows.Count, "A").End(xlUp).Row + 1
j = 1
Tar = TextBox1.Value
Do
Cells(i, "A") = ComboBox1.Value
Cells(i, "B") = Tar
Cells(i, "C") = ComboBox2.Value
Cells(i, "D") = CDbl(TextBox3.Value)
If ComboBox1 = "A" Then Cells(i, 5) = CDbl(TextBox3.Value)
If ComboBox1 = "B" Then Cells(i, 6) = CDbl(TextBox3.Value)
j = j + 1
i = i + 1
Tar = DateAdd("m", 1, Tar)
Loop While Not j > ComboBox3.Value
End Sub