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

[µo°Ý] ¦p¦ó¿ï¾Ü¿z¿ï«á¤U¤@¦Cªº¥i¨£Àx¦s®æ(¤w¸ÑµªSendKeys "{DOWN}")

[µo°Ý] ¦p¦ó¿ï¾Ü¿z¿ï«á¤U¤@¦Cªº¥i¨£Àx¦s®æ(¤w¸ÑµªSendKeys "{DOWN}")

¥»©«³Ì«á¥Ñ av8d ©ó 2011-8-30 11:35 ½s¿è

A    B    C
21
33
45


¨C·í¿z¿ï«á
¦C¼Æ³£¬O¤£©T©wªº¡A¦p¤W¡C

·í§Ú³]©w¿ï¾ÜB1
Range("B1").Select

µM«á¦V¤U¤@®æ¡A·|¸õ¨ì²Ä2¦C¡A¦ý¬O§Úªº»Ý¨D¬O¸õ¨ì21¦C
Range("B" & ActiveCell.Row + 1).Select

§Ú¥uª¾¹D¿ï¨ú¥i¨£Àx¦s®æ
Selection.SpecialCells(xlCellTypeVisible).Select

¿ï¨ú¤U¤@¦C¥i¨£Àx¦s®æ¸Ó«ç»ò°µ©O?

¦^´_ 1# av8d
  1. Sub Ex()  '¨Ì§Ç¦b¿ï©w 21,33,45µ¥¦C
  2.     With Selection.SpecialCells(xlCellTypeVisible)
  3.             .Cells(1).Select
  4.             .Areas(2).Cells(1).Select
  5.             .Areas(3).Cells(1).Select
  6.     End With
  7. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2011-8-29 16:34 ½s¿è

¦^´_ 2# GBKEE


    ÁÂÁª©¤j~½Ð°Ý¦pªGªí2¥h³]©wªí1~¤èªk¤]¬O¤@¼Ë¶Ü?

¦]¬°³o¦æ                  .Areas(2).Cells(1).Select

¥¦·|¥X²{"À³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº¿ù»~"
----------------------------------------------------------------
¦pªG©Ò¿ï¨ìªº¦C=1001ªº®É­Ô°µ¬O³o¼Ë¼g¶Ü?
If ActiveCell.Row = 1001 Then
'°µ
End If

TOP

¦^´_ 3# av8d
2¼Óªºµ{¦¡¥u¬O¨Ì·Ó¦³3¦C   ¨Ó¼gªº
½Ð°Ý¦pªGªí2¥h³]©wªí1~¤èªk¤]¬O¤@¼Ë¶Ü?  §A­nªþ¤W½d¨Ò»¡©ú»Ý¨D

TOP

¦^´_ 4# GBKEE


    ®¦ ¬Oªº §Ú©ú¥Õ  §Ú¥ý¦Û¦æ°£¿ù¬Ý¬Ý¦n¤F ÁÂÁÂ!!

TOP

SendKeys "{DOWN}"
¿z¿ï¹Lªº½d³ò¥Î³o­Ó«ü¥O«Ü¤è«K

TOP

¦^´_ 6# oobird


    ¤j¤j±z¦n~½Ð°Ý¨Ï¥Î¤èªk¬O?

§Ú§â¥L¥[¤J«ö¶s´ú¸Õ~¥i¬O¨S¦³¥ô¦ó®ÄªG!

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2011-8-31 09:32 ½s¿è

oobird ¤j¤j §Ú¬d¸ß¤F¤@¤U±zªº¤èªk~¸Ñ¶}¤F!
¤]«D±`·PÁÂGBKEE ¤j¤jªº¦^ÂÐ¥H¤Î´£¨Ñªºµª®×~¨ÌµM¥i¦æ!

TOP

¥»©«³Ì«á¥Ñ vuptp6 ©ó 2019-7-7 16:35 ½s¿è

­Éª©¸ß°Ý

§Ú¿W¥ß¼g¤@­Ó¥¨¶°

sub aaa()
SendKeys "{DOWN 10}"
end sub

¬O¦³¿ìªk¥¿½T°õ¦æ
¥i¬O¥Î©I¥s©ÎµÛ¼g¤J¨ä¥L¥¨¶°¸Ì´N¤£¥¿½T¤F

¨Ò¦pA
Sub bbb()

For i = 1 To 10
MsgBox ActiveCell.Value
aaa
Next

End Sub

¨Ò¦pB
Sub bbb()

For i = 1 To 10
MsgBox ActiveCell.Value
SendKeys "{DOWN }"
Next

End Sub

¬°¬Æ»ò·|³o¼Ë·d¤£À´


¸É¥R:¥i¬O³o¼Ë¤S¥i¥H
Sub ¿ï¾Ü¥iµø°Ï°ì()

For i = Range("A1048576").End(xlUp).Row - 1700 To 1 Step -1
    If Range("A" & i - 1) <> Range("A" & i) Then
        Range("A" & i).Select
        SendKeys "{DOWN}"
        ...
        ...
        ...
        Exit For
    End If
Next

End Sub

TOP

¤w¸g¸Ñ¨M¤F
§Ú¦bSendKeys "{DOWN}"«á¥[True´N¥i¥H¤F
SendKeys "{DOWN}", True

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD