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

[µo°Ý] °ÊºA·s¼W UserForm ¤Î CommandButton «á ¦p¦ó¼gclickªº°Ê§@¡H

§Úªº°ÝÃD¤ñ¸û²³æ¤@ÂI¡Aµ{¦¡ªº¥Øªº¬O¦b¬J¦³ªºªí³æ(UserForm3)¡A·s¼W3­ÓTextBox¡AµM«á¨C­ÓTextBox¥i¥H°õ¦æfunction(y_m_dinput (A)¡AÅܼƬ°A)¡Aµ{¦¡½X¦p¤U:
For X2 = 1 To 3
Set theTextBox = UserForm3("frame1").Controls.Add("Forms.TextBox.1", "TextBox" & TeCount + X2, True)
  With theTextBox
     .Name = "TextBox" & TeCount + X2
     If X2 = 1 Then
     .Left = 210
     ElseIf X2 = 2 Then
     .Left = 384
     Else
      .Left = 492
     End If
     .Width = 60
     .Top = K2 + 18
    myName = "Userform3"
    With ThisWorkbook.VBProject.VBComponents(myName).CodeModule
     '.DeleteLines 1, .countoflines
      Test = .countoflines - 44
     .insertlines Test, "Private Sub TextBox" & TeCount + X2 & "_Change()"
     .insertlines Test + 1, "A =" & TeCount + X2
     .insertlines Test + 2, "y_m_dinput (A)"
     .insertlines Test + 3, "End sub"
    End With
  End With
Next X2
µ{¦¡ªºµ²ªG¥i¥H¶]¥X3­ÓTextBox¡A¤]¥i¥H¼g¤F¥X¬Û¹ïÀ³ªºµ{§Ç¡A¦ý¬O´N¬OµLªk°õ¦æfunction.
½Ð°Ý°ÝÃD¥X¦b­þ??

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD