- Katılım
- 30 Kasım 2006
- Mesajlar
- 411
- Excel Vers. ve Dili
- Excel 2007 - Türkçe
TextBox1 den girilen tarihe 30 gün eklenince çıkan gün Cumartesi ise 2 gün ekle,
Pazarsa 1 gün ekle hafta içi ise günü yaz
Textbox3 deki tarih herzaman hafta içi olsun
Private Sub CommandButton1_Click()
TextBox2 = Format(CDate(TextBox1.Text) + Day(30), "dd.mm.yyyy")
If TextBox2.Text = "Cumartesi" Then 'CUMARTESİ
TextBox3.Value = Format(CDate(TextBox2.Text) + Day(2), "dd.mm.yyyy")
Else
TextBox3.Value = TextBox1.Value
End If
If TextBox2.Text = "Pazar" Then ' PAZAR
TextBox3.Value = Format(CDate(TextBox2.Text) + Day(1), "dd.mm.yyyy")
Else
TextBox3.Value = TextBox1.Value
End If
End Sub
Private Sub UserForm_Initialize()
Me.TextBox1 = Format(Date, "dd.mm.yyyy")
End Sub
Pazarsa 1 gün ekle hafta içi ise günü yaz
Textbox3 deki tarih herzaman hafta içi olsun
Private Sub CommandButton1_Click()
TextBox2 = Format(CDate(TextBox1.Text) + Day(30), "dd.mm.yyyy")
If TextBox2.Text = "Cumartesi" Then 'CUMARTESİ
TextBox3.Value = Format(CDate(TextBox2.Text) + Day(2), "dd.mm.yyyy")
Else
TextBox3.Value = TextBox1.Value
End If
If TextBox2.Text = "Pazar" Then ' PAZAR
TextBox3.Value = Format(CDate(TextBox2.Text) + Day(1), "dd.mm.yyyy")
Else
TextBox3.Value = TextBox1.Value
End If
End Sub
Private Sub UserForm_Initialize()
Me.TextBox1 = Format(Date, "dd.mm.yyyy")
End Sub
Ekli dosyalar
Son düzenleme:
