Klassenmodul
04.10.2020 02:48:13
Oliver
Ich habe ein Problem
Ich bin gerade dabei eine Schiebetafel zu basteln
Wo man Buttons an Labeln ausrichtet
In meinem Klassenmodul schaffe ich es einfach nicht von einer Textbox aus ein Button zu Beschriften
Finde einfach nicht den Fehler
Eine Fehlermeldung kommt im Klassenmodul
Beim Keydown Ereignis
Option Explicit
Public WithEvents cButton As CommandButton
Public WithEvents Label As MSForms.Label
Public WithEvents Txtbox As MSForms.TextBox
Private Sub Class_Initialize()
Static collcButton As New Collection
collcButton.Add Me
Static collLabel As New Collection
collLabel.Add Me
Static collTxtbox As New Collection
collTxtbox.Add Me
Static collFrame As New Collection
collFrame.Add Me
End Sub
Private Sub cButton_Click()
UserForm4.TextBox1.Visible = True
End Sub
Public Sub TxtBox_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
Txtbox.Visible = False
cButton.caption = Txtbox.Text
End If
End Sub