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

[µo°Ý] ¦p¦óÅý°j°é©ÒŪ¨ú¨ìªº¸ê®Æ³£Åã¥Ü¹L? (G¤j,ÁÂÁ§A)

[µo°Ý] ¦p¦óÅý°j°é©ÒŪ¨ú¨ìªº¸ê®Æ³£Åã¥Ü¹L? (G¤j,ÁÂÁ§A)

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-27 10:43 ½s¿è

For i = 1 To 18
    If Me.Controls("OptionButton" & i).Value = True Then   
    TextBox1 = i & "ÁʶR"
End Sub

¦pªGi=1,3,6,8,15,16
§Ú¸Ó¦p¦óÅýTextBox1 Åã¥Ü1,3,6,8,15,16ÁʶR

¦^´_ 1# av8d
  1. For i = 1 To 18
  2.         If Me.Controls("OptionButton" & i).Value = True Then
  3.             TextBox1 = IIf(TextBox1 <> "", "," & i, i)
  4.         End If
  5.     Next
  6.     TextBox1 = TextBox1 & "ÁʶR"
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-25 23:13 ½s¿è

¦^´_ 2# GBKEE


    ÁÂÁÂG¤j~

§Ú¥i§_¶¶«K¸ß°Ý¤@¤U~
Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7)
3 2 1 1 7 ¤À§O¬O»¡©ú¦a¤èªº?§Ú¥uª¾¹D7¦n¹³¬O¦@7Ä檺·N«ä?

TOP

¦^´_ 3# av8d
¦h¬Ý VBAªº»¡©ú¥i¤F¸Ñ
End ÄÝ©Ê ½Ð°Ñ¾\®M¥Î¦Ü½d¨Ò¯S©w¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥]§t¨Ó·½½d³ò¤§°Ï°ìµ²§À³BªºÀx¦s®æ¡Cµ¥©ó«ö END+¦V¤WÁä¡BEND+¦V¤UÁä¡BEND+¦V¥ªÁä©Î END+¦V¥kÁä¡C°ßŪ Range ª«¥ó¡C
expression.End(Direction)
expression    ¥²¿ï¡C¦¹¹Bºâ¦¡·|¶Ç¦^ [®M¥Î¦Ü] ²M³æ¤¤ªº¨ä¤¤¤@­Óª«¥ó¡C
Direction    ¥²¿ïªº XlDirection¡C­n²¾©¹ªº¤è¦V¡C
XlDirection ¥i¥H¬O³o¨Ç XlDirection ±`¼Æ¤§¤@¡C
xlDown      ->4
xlToRight  ->2
xlToLeft     ->1
xlUp           ->3
Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7)=>Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(xlUp).Cells(2, 1).Resize(1, 7)

TOP

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