• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

DTPicker hatası

udentr2002

Altın Üye
Katılım
5 Kasım 2006
Mesajlar
1,503
Excel Vers. ve Dili
iş yerinde Office 365
evde Office 365
Userform initialize olayını aşağıdaki kodları yazdım.

Kod:
Private Sub UserForm_Initialize()
Label1.Visible = False
DTPicker1.Value = Date
DTPicker2.Value = Date

Dim shV As Worksheet
Dim shR As Worksheet
Dim rg As Range
Dim hcr As Range
Set shV = Sheets("Veri")
Set shR = Sheets("Rapor")
shR.Range("b1") = DTPicker1 & " " & "--" & " " & DTPicker2 & " " & "Tarihler Arasında"
shR.Range("A3:K1000").ClearContents
Set rg = shV.Range("P5:AB" & shV.Cells(65536, 2).End(xlUp).Row)
For Each hcr In rg.Cells
    If IsDate(hcr) Then
        If hcr >= DTPicker1 And hcr <= DTPicker2 Then
            Select Case hcr.Column
                Case 16, 17, 18, 19, 20, 21, 22, 23, 24
                    sicaklik = shV.Cells(2, "P")
                Case Else
                    sicaklik = shV.Cells(2, "Y")
            End Select
            Z = Z + 1
            son = shR.Cells(65536, 1).End(xlUp).Row + 1
            shR.Cells(son, 1) = Z
            shR.Cells(son, 2) = shV.Cells(hcr.Row, 2)
            shR.Cells(son, 3) = shV.Cells(hcr.Row, 3)
            shR.Cells(son, 4) = sicaklik
            shR.Cells(son, 5) = shV.Cells(3, hcr.Column)
            shR.Cells(son, 6) = hcr 'shV.Cells(hcr.Row, "I")
            shR.Cells(son, 7) = shV.Cells(hcr.Row, "M")
            shR.Cells(son, 8) = shV.Cells(hcr.Row, "N")
            shR.Cells(son, 9) = shV.Cells(hcr.Row, "o")
            UserForm1.TextBox1 = shR.Range("a3")
         End If
    End If
Next
shR.Select
Set shV = Nothing
Set shR = Nothing
Set rg = Nothing

ListBox1.ColumnHeads = True
ListBox1.ColumnCount = 9
ListBox1.ColumnWidths = "50;275;120;100;50;100;60;100;180"
ListBox1.RowSource = "Rapor!a3:I" & Sheets("Rapor").Range("a65536").End(3).Row

For sira = 3 To [a65000].End(3).Row
Range("A" & sira) = sira - 2
Next
If TextBox1.Text = "" Then
Label1.Visible = True
ListBox1.Visible = False
End If

End Sub

Ama aşağıdaki uyarıyı alıyorum bu uyarının araştırmasnı yaptım ama bulamadım

Kod:
Run time error 35788

an error occurred in a call to the windows date and time picker control

Bu uyarı hakkında yardımcı olursanız çok sevinirim.
 
Konu hakkında yardımcı olabilecek bir hocam var mı acaba?
 
sayın değerli hocalarım yardımınıza ihtiyacım var.
 
Eğer dtpicker nesneleri userformun ilk açılışında aynı aktif yüzde değilse initialize olayına yazdığınız aşağıdaki iki satır nedeniyle hata alırsınız. Bu durumda initialize olayındaki aşağıdaki iki satır için farklı bir mantık düşünün.

Kod:
DTPicker1.Value = Date
DTPicker2.Value = Date
 
Geri
Üst