ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] °ÊºA·s¼W±±¨î«á«ç»òIJµo¨Æ¥ó

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-4-8 13:47 ½s¿è

¦^´_ 1# modelcrazyer
1 ªí³æ¼Ò²Õµ{¦¡½X
  1. Option Explicit
  2. Dim AA(1 To 3) As New Class1
  3. Private Sub CommandButton1_Click()
  4.     Dim theTextBox  As Control, K As Integer, I As Integer
  5.     K = 10
  6.     For I = 1 To 3
  7.         Set theTextBox = Me.Controls.Add("Forms.TextBox.1", "TextBox" & I, True)
  8.         Set AA(I).C_TextBox = theTextBox
  9.         With theTextBox
  10.                 .Left = 210
  11.                 .Top = K
  12.                 K = .Top + .Height + 18
  13.         End With
  14.     Next I
  15.     Set theTextBox = Nothing
  16. End Sub
½Æ»s¥N½X
2 ª«¥óÃþ§O¼Ò²Õ·s¼W¤@¼Ò²Õ:·|¦Û°Ê©R¦W Class1
  1. Option Explicit
  2. Public WithEvents C_TextBox As MSForms.TextBox
  3. Private Sub C_TextBox_Change()
  4.     If Not IsNumeric(C_TextBox) Then MsgBox C_TextBox & " ¤£¬O¼Æ¦r"
  5. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD