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

[µo°Ý] ½Ð°Ý¤@­Ó­«Âе{¦¡½X¨Ï¥Î¤Wªº°ÝÃD

¦^´_ 2# register313


  ½Ð°Ý ¹³±z©Ò¼gªºµ{¦¡½X ¤]¬O¥i¥H¹B¥Î¦b¤u§@ªí¤Wªº³]¸m¦nªºTextbox ¶Ü¡H

TOP

¦^´_ 1# mygod0403



ªí³æUserForm1µ{¦¡½X
  1. Dim col As New Collection
  2. Private Sub UserForm_initialize()
  3. Dim myc As cmds
  4. For i = 1 To 10
  5.   Set myc = New cmds
  6.   Set myc.cmd = Me.Controls("Textbox" & i)
  7.   col.Add myc
  8. Next
  9. Set myc = Nothing
  10. End Sub
½Æ»s¥N½X
ª«¥óÃþ§O¼Ò²Õcmdsµ{¦¡½X
  1. Public WithEvents cmd As MSForms.TextBox
  2. Private Sub cmd_change()
  3. For i = 1 To 10
  4.   data = data + Val(UserForm1.Controls("Textbox" & i))
  5.   UserForm1.Label1.Caption = data
  6. Next
  7. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD