Merhabalar,
Aşağıda yazacağım kodu ne anlama geldiğini açıklayabilir misiniz ?
şimdiden teşekkür ederim.
Private Sub ComboBox1_Change()
Application.ScreenUpdating = False
Set S = Sheets("Diyot")
Set v = Sheets("Diyot Ölçümü")
Dim vy As Boolean
vy = False
Dim bh As Integer
For t = 2 To 1000
If S.Cells(t, "A") = ComboBox1.Text Then
bh = S.Cells(t, "A").MergeArea.Count
ss = v.Range("A" & Rows.Count).End(3).Row
sb = v.Cells(ss, "A").MergeArea.Count
v.Range(v.Cells(ss + sb, "A"), v.Cells(ss + sb + bh - 1, "A")).Merge
With v.Range(v.Cells(ss + sb, "A"), v.Cells(ss + sb + bh - 1, "A"))
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
sn = v.Cells(ss, "A").Value
If v.Cells(ss, "A").Value = "NO" Then
v.Cells(ss + sb, "A").Value = 1
Else
v.Cells(ss + sb, "A").Value = sn + 1
End If
S.Range(S.Cells(t, "A"), S.Cells(t + bh - 1, "D")).Copy v.Cells(ss + sb, "B")
ssr = v.Range("A" & Rows.Count).End(3).Row
sbr = v.Cells(ssr, "A").MergeArea.Count
v.Range(v.Cells(ss + sb, "A"), v.Cells(ssr + sbr - 1, "P")).Borders.LineStyle = xlContinuous
v.Columns.AutoFit
vy = True
Exit For
End If
Next
Application.ScreenUpdating = True
If vy = False Then MsgBox "Veri bulunamadı", vbInformation, "wolf"
End Sub
Aşağıda yazacağım kodu ne anlama geldiğini açıklayabilir misiniz ?
şimdiden teşekkür ederim.
Private Sub ComboBox1_Change()
Application.ScreenUpdating = False
Set S = Sheets("Diyot")
Set v = Sheets("Diyot Ölçümü")
Dim vy As Boolean
vy = False
Dim bh As Integer
For t = 2 To 1000
If S.Cells(t, "A") = ComboBox1.Text Then
bh = S.Cells(t, "A").MergeArea.Count
ss = v.Range("A" & Rows.Count).End(3).Row
sb = v.Cells(ss, "A").MergeArea.Count
v.Range(v.Cells(ss + sb, "A"), v.Cells(ss + sb + bh - 1, "A")).Merge
With v.Range(v.Cells(ss + sb, "A"), v.Cells(ss + sb + bh - 1, "A"))
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
sn = v.Cells(ss, "A").Value
If v.Cells(ss, "A").Value = "NO" Then
v.Cells(ss + sb, "A").Value = 1
Else
v.Cells(ss + sb, "A").Value = sn + 1
End If
S.Range(S.Cells(t, "A"), S.Cells(t + bh - 1, "D")).Copy v.Cells(ss + sb, "B")
ssr = v.Range("A" & Rows.Count).End(3).Row
sbr = v.Cells(ssr, "A").MergeArea.Count
v.Range(v.Cells(ss + sb, "A"), v.Cells(ssr + sbr - 1, "P")).Borders.LineStyle = xlContinuous
v.Columns.AutoFit
vy = True
Exit For
End If
Next
Application.ScreenUpdating = True
If vy = False Then MsgBox "Veri bulunamadı", vbInformation, "wolf"
End Sub
