- Katılım
- 29 Kasım 2018
- Mesajlar
- 19
- Excel Vers. ve Dili
- esq
- Altın Üyelik Bitiş Tarihi
- 20-12-2019
bu kod sayfasındaki combox1 'e sadece bazı sayfaların gözükmesini istiyorum sayfa adlarını girmek üzere nasıl yaparım acaba ?
Private Sub ComboBox1_Change()
On Error Resume Next
Sheets(ComboBox1.Value).Select
End Sub
Private Sub CommandButton1_Click()
With Sheets(ComboBox1.Text)
Son = .Cells(.Rows.Count, 1).End(3).Row + 1
.Cells(Son, 1) = CDate(TextBox3.Value)
.Cells(Son, 2) = ListBox1.Value
.Cells(Son, 3) = TextBox2.Value
.Cells(Son, 4) = TextBox1.Value
.Cells(Son, 5) = ListBox2.Value
.Cells(Son, 6) = .Cells(Son, 4) / .Cells(Son, 5)
.Cells(Son, 7) = ListBox3.Value
End With
MsgBox "Kayıt işlemi tamamlanmıştır.", vbInformation
End Sub
Private Sub ListBox3_Click()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Dim syf As Worksheet
For Each syf In Worksheets
If syf.Name <> "TAKİP" Then
ComboBox1.AddItem syf.Name
End If
Next
'If ComboBox1.ListCount > 0 Then ComboBox1.ListIndex = 0
With ListBox1
.AddItem "Ocak"
.AddItem "Şubat"
.AddItem "Mart"
.AddItem "Nisan"
.AddItem "Mayıs"
.AddItem "Haziran"
.AddItem "Temmuz"
.AddItem "Ağustos"
.AddItem "Eylül"
.AddItem "Ekim"
.AddItem "Kasım"
.AddItem "Aralık"
End With
For i = 1 To 12
ListBox2.AddItem i
Next i
With ListBox3
.AddItem "BT"
.AddItem "KURUM"
End With
End Sub
Private Sub TextBox3_Change()
TextBox3 = Format(Date, "mm"".""dd"".""yyyy")
End Sub
Private Sub ComboBox1_Change()
On Error Resume Next
Sheets(ComboBox1.Value).Select
End Sub
Private Sub CommandButton1_Click()
With Sheets(ComboBox1.Text)
Son = .Cells(.Rows.Count, 1).End(3).Row + 1
.Cells(Son, 1) = CDate(TextBox3.Value)
.Cells(Son, 2) = ListBox1.Value
.Cells(Son, 3) = TextBox2.Value
.Cells(Son, 4) = TextBox1.Value
.Cells(Son, 5) = ListBox2.Value
.Cells(Son, 6) = .Cells(Son, 4) / .Cells(Son, 5)
.Cells(Son, 7) = ListBox3.Value
End With
MsgBox "Kayıt işlemi tamamlanmıştır.", vbInformation
End Sub
Private Sub ListBox3_Click()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Dim syf As Worksheet
For Each syf In Worksheets
If syf.Name <> "TAKİP" Then
ComboBox1.AddItem syf.Name
End If
Next
'If ComboBox1.ListCount > 0 Then ComboBox1.ListIndex = 0
With ListBox1
.AddItem "Ocak"
.AddItem "Şubat"
.AddItem "Mart"
.AddItem "Nisan"
.AddItem "Mayıs"
.AddItem "Haziran"
.AddItem "Temmuz"
.AddItem "Ağustos"
.AddItem "Eylül"
.AddItem "Ekim"
.AddItem "Kasım"
.AddItem "Aralık"
End With
For i = 1 To 12
ListBox2.AddItem i
Next i
With ListBox3
.AddItem "BT"
.AddItem "KURUM"
End With
End Sub
Private Sub TextBox3_Change()
TextBox3 = Format(Date, "mm"".""dd"".""yyyy")
End Sub