Gruppe
Dialog
Problem
Eine UserForm soll ausgeblendet und mit Werten wieder aufgerufen werden, wobei alle Textfelder zu leeren sind.
ClassModule: frmHide
Private Sub cmdHide_Click()
Hide
End Sub
Private Sub cmdUnload_Click()
Unload Me
End Sub
Private Sub UserForm_Activate()
Dim cntr As Control
For Each cntr In Controls
If TypeName(cntr) = "TextBox" Then
cntr.Text = ""
End If
Next cntr
If lblCalls.Caption = "" Then
lblCalls.Caption = "1"
Else
lblCalls.Caption = CStr(CInt(lblCalls.Caption) + 1)
End If
End Sub
StandardModule: Modul1
Sub CallForm()
frmHide.Show
End Sub