Steuerelementefelder ansprechen

TextBox
Option Explicit
Dim X%
Private Sub cmdStart_Click()
 For X = 1 To Text1.Count
  Set PseudoTextbox = Text1(X)
  Call MeinProgramm(PseudoTextbox, X)
 Next X
End Sub
Private Sub cmdLoesch_Click()
For X = 1 To Text1.Count
  Set PseudoTextbox = Text1(X)
  Call LöschMich(PseudoTextbox)
 Next X
End Sub
' --------------------------------   und das steht im Modul...  ------------------------------------------
Option Explicit
Public PseudoTextbox As TextBox
Public Function MeinProgramm(PSEUDO As TextBox, TextBoxNr%)
With PSEUDO
 Select Case TextBoxNr
  Case 1
   .BackColor = vbRed
   .Text = "Frank's Problem Nr. " & TextBoxNr
  Case 3
   .Alignment = vbCenter
   .Text = "Halleluja"
  Case 7
   .Alignment = vbRightJustify
   .Text = "Frank's Problem Nr. " & TextBoxNr
  Case 12
   .FontBold = True
   .Alignment = vbCenter
   .Text = "Frank's Problem Nr. " & TextBoxNr
  Case 15
   .BackColor = vbGreen
   .Text = "Frank's Problem Nr. " & TextBoxNr
  Case Else
   .Text = "Winnie's Problem Nr. " & TextBoxNr
 End Select
End With
End Function
Public Function LöschMich(TextBoxNr As TextBox)
With TextBoxNr
  .Text = vbNullString
  .Alignment = vbLeftJustify
End With
End Function



 Ranking-Hits zurück Sitemap
Designed by www.wbrnet.info