Merhabalar;
Aşağıdaki kodlarda bir sorun yok, lakin liste uzadıkça, yazması hem zaman alıyor, hem de belli bir müddet sonra kontrol edemiyorum. Talebim, bir döngü ile bu kodların kısaltılıp kısaltılamayacağıdır!
Teşekkürler.
Aşağıdaki kodlarda bir sorun yok, lakin liste uzadıkça, yazması hem zaman alıyor, hem de belli bir müddet sonra kontrol edemiyorum. Talebim, bir döngü ile bu kodların kısaltılıp kısaltılamayacağıdır!
Teşekkürler.
Kod:
If ListBox5.List(0, 0) = "" Then
Sheets("tge").[b15].Value = ""
Else
Sheets("tge").[b15].Value = ListBox5.List(0, 0)
End If
If ListBox5.List(1, 0) = "" Then
Sheets("tge").[b15].Value = ListBox5.List(0, 0)
Else
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0)
End If
If ListBox5.List(2, 0) = "" Then
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0)
Else
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0) & ", " & ListBox5.List(2, 0)
End If
If ListBox5.List(3, 0) = "" Then
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0) & ", " & ListBox5.List(2, 0)
Else
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0) & ", " & ListBox5.List(2, 0) & ", " & ListBox5.List(3, 0)
End If
If ListBox5.List(4, 0) = "" Then
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0) & ", " & ListBox5.List(2, 0) & ", " & ListBox5.List(3, 0)
Else
Sheets("tge").[b15].Value = ListBox5.List(0, 0) & ", " & ListBox5.List(1, 0) & ", " & ListBox5.List(2, 0) & ", " & ListBox5.List(3, 0) & ", " & ListBox5.List(4, 0)
