|
[code=vba]Sub FormMetinKutusuListele()
Dim ctrl As Control
Dim frm As Form
Dim mesaj As String
' Aktif formu al (kullanıcı o anda hangi formdaysa)
Set frm = Screen.ActiveForm
' Formdaki tüm kontrolleri dolaş
For Each ctrl In frm.Controls
' Metin kutusu veya birleşik giriş kutusu ise ekle
If TypeOf ctrl Is TextBox Or TypeOf ctrl Is ComboBox Then
If mesaj <> "" Then mesaj = mesaj & ", "
mesaj = mesaj & ctrl.
|