- Katılım
- 30 Kasım 2006
- Mesajlar
- 411
- Excel Vers. ve Dili
- Excel 2007 - Türkçe
- Altın Üyelik Bitiş Tarihi
- 05.07.2020
Değerli Hocalarım
Aşağıdaki Kod Toplu ListBox,Texbox,ComBobox, ChecBox ve OptionButtonların içeriğini temizlemeye çalıştım ancak uzun zaman takılıp kalıyor Daha kısa nasıl Temizleme yapabilirim.
Private Sub İPTAL_Click()
On Error Resume Next
B6.SetFocus 'OptionButton
B6.Value = False
B7.SetFocus
B7.Value = False
D1.SetFocus
D1.Value = False
D2.SetFocus
D2.Value = False
D3.SetFocus
D3.Value = False
D33.SetFocus
D34.Value = False
D7.SetFocus
D7.Value = False
D8.SetFocus
D8.Value = False
DFİŞİ1.SetFocus
DFİŞİ2.Value = False
F1.SetFocus
F2.Value = False
F3.SetFocus
F4.Value = False
F7.SetFocus
F7.Value = False
F8.SetFocus
F8.Value = False
V1.SetFocus
V1.Value = False
V2.SetFocus
V2.Value = False
V3.SetFocus
V3.Value = False
V4.SetFocus
V4.Value = False
ListBox1.Clear
ListBox2.Clear
ListBox3.Clear
ListBox4.Clear
ListBox5.Clear
ListBox6.Clear
'..................... Özel Buton......................
B5.Caption = ""
F5.Caption = ""
V5.Caption = ""
D23.Caption = ""
'.............................................................
Dim Nesne As Control
For Each Nesne In Controls
Select Case TypeName(Nesne)
Case "TextBox", "ComboBox"
Nesne = ""
End Select
Next
Dim say, i
say = WorksheetFunction.CountA(Range("A2:A65500")) 'Sıralama
For i = 2 To say
Cells(i + 1, 1) = i
Next i
End Sub
Aşağıdaki Kod Toplu ListBox,Texbox,ComBobox, ChecBox ve OptionButtonların içeriğini temizlemeye çalıştım ancak uzun zaman takılıp kalıyor Daha kısa nasıl Temizleme yapabilirim.
Private Sub İPTAL_Click()
On Error Resume Next
B6.SetFocus 'OptionButton
B6.Value = False
B7.SetFocus
B7.Value = False
D1.SetFocus
D1.Value = False
D2.SetFocus
D2.Value = False
D3.SetFocus
D3.Value = False
D33.SetFocus
D34.Value = False
D7.SetFocus
D7.Value = False
D8.SetFocus
D8.Value = False
DFİŞİ1.SetFocus
DFİŞİ2.Value = False
F1.SetFocus
F2.Value = False
F3.SetFocus
F4.Value = False
F7.SetFocus
F7.Value = False
F8.SetFocus
F8.Value = False
V1.SetFocus
V1.Value = False
V2.SetFocus
V2.Value = False
V3.SetFocus
V3.Value = False
V4.SetFocus
V4.Value = False
ListBox1.Clear
ListBox2.Clear
ListBox3.Clear
ListBox4.Clear
ListBox5.Clear
ListBox6.Clear
'..................... Özel Buton......................
B5.Caption = ""
F5.Caption = ""
V5.Caption = ""
D23.Caption = ""
'.............................................................
Dim Nesne As Control
For Each Nesne In Controls
Select Case TypeName(Nesne)
Case "TextBox", "ComboBox"
Nesne = ""
End Select
Next
Dim say, i
say = WorksheetFunction.CountA(Range("A2:A65500")) 'Sıralama
For i = 2 To say
Cells(i + 1, 1) = i
Next i
End Sub