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

[µo°Ý] ¦bªí³æ¦p¦ó«Ø¥ßª«¥óªº¯x°}

[µo°Ý] ¦bªí³æ¦p¦ó«Ø¥ßª«¥óªº¯x°}

½Ð°Ý¦U¦ì¤j¤j,
   §Ú¦bªí³æ³]­p¤W¡A¦p¦ó«Ø¥ßª«¥óªº¯x°}©O?
   ¦p : §Ú»Ý­n«Ø¥ß 10 ­Ó TextBox ¡A¦p¦óÅý³o10­ÓTextBox Åܦ¨¯x°}¡A¥H¤è«KŪ¼g

·PÁÂ

¦^´_ 1# mobo


§Aªº·N«ä¬O§_³o¼Ë?

®ÄªG («ö¨ä¤¤¤@button)
  1. Private Sub CommandButton1_Click()
  2.     For i = 0 To 9
  3.         If TypeName(Me.Controls(i)) = "TextBox" Then
  4.             Me.Controls(i) = i + 1
  5.         End If
  6.     Next
  7. End Sub

  8. Private Sub CommandButton2_Click()
  9.     For i = 1 To 10
  10.         Me.Controls("textbox" & Trim(Str(i))) = i
  11.     Next
  12. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-22 13:58 ½s¿è

¦^´_ 1# mobo
  1. Option Explicit
  2. Dim Ar()
  3. Private Sub CommandButton1_Click()
  4.     Dim E As Variant, i As Integer
  5.     [A1].Resize(, UBound(Ar) + 1) = Ar
  6.     For i = 1 To UBound(Ar) + 1
  7.         Cells(2, i) = Ar(i - 1)
  8.     Next
  9. End Sub
  10. Private Sub UserForm_Initialize()
  11.     Dim E As MSForms.Control, i As Integer
  12.     For Each E In Controls
  13.         If TypeName(E) = "TextBox" Then
  14.             ReDim Preserve Ar(i)
  15.             Set Ar(i) = E
  16.             i = i + 1
  17.         End If
  18.     Next
  19. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD