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

¦p¦ó±NTextBox©M½s¸¹¤À¶}?

¦p¦ó±NTextBox©M½s¸¹¤À¶}?

¥»©«³Ì«á¥Ñ av8d ©ó 2011-9-8 08:19 ½s¿è

For i = 2 To 7
"TextBox" & i=""
Next i
End Sub

¥H¤W°µªk·|µo¥Í¿ù»~
¬O¦]¬°TextBox¬Oª«¥ó¶Ü?

­YTextBox2+TextBox3+++++TextBox7¤S¸Ó«ç¼g?

¦^´_ 13# av8d
­n«ü©w¦h­Ó¾ã¼ÆÅܼƬO§_¦³§ó«K±¶ªº¤è¦¡©O?
Dim N() As Integer, i As  Integer, ATO As  Integer

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2011-9-9 09:40 ½s¿è

¦^´_ 12# GBKEE


    ¤j¤j±z¦n~
1.¦pªG­n«ü©w¦h­Ó¾ã¼ÆÅܼƬO§_¦³§ó«K±¶ªº¤è¦¡©O? ÁÂ
¦pªG¹Bºâ«á­nµL±ø¥ó±Ë¥h¥u¨ú¾ã¼Æ~¦n¹³ÁÙ¬O¥²¶·¨Ï¥Îint
ATO = INT(N(3) / N(2))

TOP

¦^´_ 11# av8d
Val ±N¦r¦êÂà´«¬°¼Æ¦r
  1. Option Explicit
  2. Private Sub CommandButton2_Click()
  3.     Dim N(), i ,ATO
  4.     ReDim N(1 To 3)
  5.     For i = 1 To 3
  6.         N(i) = Val(¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value)
  7.         'N(i) = ¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value
  8.     Next
  9. ATO = N(3) + N(2)
  10. 'ATO = Val(N(3)) + Val(N(2))
  11. MsgBox ATO
  12. End Sub

  13. ''''''''''''''''Åܼƫü©w¬°¾ã¼Æ  '''''''''''''''''''''''
  14. Private Sub CommandButton2_Click()
  15.     Dim N() As Integer, i As Integer, ATO As Integer
  16.     i = 3
  17.     ReDim N(1 To i)
  18.     For i = 1 To 3
  19.         N(i) = ¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value
  20.     Next
  21. ATO = N(3) + N(2)
  22. MsgBox ATO
  23. End Sub
½Æ»s¥N½X

TOP

¦^´_ 10# GBKEE


    ¤j¤j±z¦n~¥i¬O¥L­pºâªº¼Æ­È©Ç©Çªº~

¥L¤£·|¯À½è¥[Á`

¨Ò¦pN3=3,N2=2,N3+N2=32·|Åܦ¨³o¼Ë

TOP

¦^´_ 9# av8d
N¬O°}¦C
ATO = N(3) + N(2)

TOP

Option Explicit
Private Sub CommandButton2_Click()
    Dim N()
    i = 1
    ReDim N(1 To 3)
    For i = 1 To 3
        N(i) = ¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value
    Next
ATO = N3 + N2
MsgBox ATO


¤£ª¾¹D¬°¤°»ò µª®×³£¬O0


End Sub

TOP

¦^´_ 7# av8d
  1. Option Explicit
  2. 'n1 = Val(TextBox1)
  3. 'n2 = Val(TextBox2)
  4. 'n3 = Val(TextBox3)
  5. Sub Ex()
  6.     'Dim N(1 To 3)   '¤]¥i¥H
  7.     Dim N()
  8.     i = 3
  9.     ReDim N(1 To 3)
  10.     For i = 1 To 3
  11.         N(i) = ¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value
  12.     Next
  13. End Sub
½Æ»s¥N½X

TOP

G¤j±z¦n~§Ú¥i§_¦b¸ß°Ý¤@¤UÃö©ó¥H¤Uªº§ï¼g¤è¦¡
n1 = Val(TextBox1)
n2= Val(TextBox2)
n3= Val(TextBox3)
­Y§ï¼g¦¨°j°é§ï«ç»ò¼g?
¥H¤U¨â­Ó¼gªk³£·|¥X²{¿ù»~.
For i = 1 To 3
    For j = 1 To 3
        "n" & j = ¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value
    Next j
Next i
-------------------------------------------------------
For i = 1 To 3
    For j = 1 To 3
        "n" & j = Controls("TextBox" & i).Value
    Next j
Next i

TOP

¦^´_ 3# av8d
¦P©Ê¸êªº°ÝÃD ½Ð§O¦Aµo¤@¦¸·s©«,®ö¶O½×¾Â¸ê·½.
±±¨î¶µ¬O¦³¤À§O  1 Form ¤Î 2 ¤u§@ªí
³o¸Ì¬O¤u§@ªíªº±±¨î¶µ, ¥Ñ¤u¨ã->±±¨î¤u¨ã½c ²£¥Íªº
  1. Private Sub CommandButton1_Click()
  2.     For i = 2 To 4
  3.         ¤u§@ªí1.OLEObjects("TextBox" & i).Object.Value = ""
  4.     Next i
  5. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD