hocalarım aşağıdaki kodu inceler ve hatami sölermisiniz;
combo box 1-3-4-5 seçimlerinden denk gelen hücreye combobox 2 deki veriyi aşağıdaki kod ile yazdırmadım ;
seçimde sorun yok ama yazırmak için
ComboBox2.Value = Range( " & .Name & " sayfasındaki " & .Cells(satir, sutun).Address)
bu satırın neresinde sorun var acaba
kod
Private Sub CommandButton3_Click()
Dim rngGunler As Range
Dim rngGun As Range
Dim rngUrunler As Range
Dim rngUrun As Range
Dim hcr As Range
Dim sutun As Integer
Dim satir As Integer
If ComboBox1.ListIndex < 0 Then: Exit Sub
If ComboBox3.ListIndex < 0 Then: Exit Sub
If ComboBox4.ListIndex < 0 Then: Exit Sub
If ComboBox5.ListIndex < 0 Then: Exit Sub
With sh
Set rngGunler = .Range(.Cells(2, 4), .Cells(2, .Cells(2, 256).End(xlToLeft).Column))
Set rngGun = rngGunler.Find(ComboBox3, Lookat:=xlWhole)
If Not rngGun Is Nothing Then
If rngGun.MergeCells Then
Set rngGun = rngGun.MergeArea
Set rngGun = .Range(.Cells(3, rngGun.Column), .Cells(3, rngGun.Column + rngGun.Columns.Count - 1))
For Each hcr In rngGun
If hcr = ComboBox4 Then
sutun = hcr.Column
Exit For
End If
Next
End If
End If
Set rngUrunler = .Range(.Cells(4, 2), .Cells(.Cells(65536, 2).End(xlUp).Row, 2))
Set rngUrun = rngUrunler.Find(ComboBox5, Lookat:=xlWhole)
If Not rngUrun Is Nothing Then
satir = rngUrun.Row
End If
ComboBox2.Value = Range( " & .Name & " sayfasındaki " & .Cells(satir, sutun).Address)
End With
Set rngGunler = Nothing
Set rngGun = Nothing
Set rngUrunler = Nothing
Set rngUrun = Nothing
End Sub
combo box 1-3-4-5 seçimlerinden denk gelen hücreye combobox 2 deki veriyi aşağıdaki kod ile yazdırmadım ;
seçimde sorun yok ama yazırmak için
ComboBox2.Value = Range( " & .Name & " sayfasındaki " & .Cells(satir, sutun).Address)
bu satırın neresinde sorun var acaba
kod
Private Sub CommandButton3_Click()
Dim rngGunler As Range
Dim rngGun As Range
Dim rngUrunler As Range
Dim rngUrun As Range
Dim hcr As Range
Dim sutun As Integer
Dim satir As Integer
If ComboBox1.ListIndex < 0 Then: Exit Sub
If ComboBox3.ListIndex < 0 Then: Exit Sub
If ComboBox4.ListIndex < 0 Then: Exit Sub
If ComboBox5.ListIndex < 0 Then: Exit Sub
With sh
Set rngGunler = .Range(.Cells(2, 4), .Cells(2, .Cells(2, 256).End(xlToLeft).Column))
Set rngGun = rngGunler.Find(ComboBox3, Lookat:=xlWhole)
If Not rngGun Is Nothing Then
If rngGun.MergeCells Then
Set rngGun = rngGun.MergeArea
Set rngGun = .Range(.Cells(3, rngGun.Column), .Cells(3, rngGun.Column + rngGun.Columns.Count - 1))
For Each hcr In rngGun
If hcr = ComboBox4 Then
sutun = hcr.Column
Exit For
End If
Next
End If
End If
Set rngUrunler = .Range(.Cells(4, 2), .Cells(.Cells(65536, 2).End(xlUp).Row, 2))
Set rngUrun = rngUrunler.Find(ComboBox5, Lookat:=xlWhole)
If Not rngUrun Is Nothing Then
satir = rngUrun.Row
End If
ComboBox2.Value = Range( " & .Name & " sayfasındaki " & .Cells(satir, sutun).Address)
End With
Set rngGunler = Nothing
Set rngGun = Nothing
Set rngUrunler = Nothing
Set rngUrun = Nothing
End Sub