- Kod: Tümünü seç
Public WithEvents txt As MSForms.TextBox
Private Sub txt_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
MsgBox txt.Name
End Sub
■ UserForm kodları;
- Kod: Tümünü seç
Dim txtler() As New Class1
Private Sub UserForm_Initialize()
Dim nense As Control
For Each nesne In Controls
If TypeName(nesne) = "TextBox" Then
ReDim Preserve txtler(i)
Set txtler(i).txt = nesne
i = i + 1
End If
Next
End Sub