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

[µo°Ý] VBA ¦Û°Ê´¡¤J¦ÜªÅ¥Õ®æ¤è¦¡

¦^´_ 9# lichang


    sorry¡A§ï³o¼ËÀ³¸Ó´N¦æ¤F
  1. Private Sub CommandButton1_Click()
  2. Dim Col As Integer
  3. Col = Sheets("¤u§@ªí1").[a1].End(xlToRight).Column + 1
  4. Cells(1, Col) = TextBox1.Value
  5. Cells(2, Col) = TextBox2.Value
  6. Cells(3, Col) = TextBox3.Value
  7. Range(Cells(1, 2), Cells(3, [iv3].End(1).Column)).Select
  8. Selection.Sort Key1:=Range("b1"), Order1:=xlAscending, Header:=xlGuess, _
  9.         OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, SortMethod _
  10.         :=xlStroke, DataOption1:=xlSortNormal
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 10# ­ã´£³¡ªL

ª©¥D»yªk¯u¬O²¼ä¦³¤O¡A¤£·\¬OªO¥D

TOP

¦^´_ 10# ­ã´£³¡ªL

¤j¤j½Ð°Ý¤@¤U¡A¦pªG§Ú¬O±q§Oªº¤À­¶¨Ó©I¥s¸Ó¤À­¶®É¡A«e­±­n«ç»ò¥[¡A¦]¬°§Ú²{¦b©I¥s®É¡A¥L¬O¥H§Ú¥Ø«e©I¥sªº¤À­¶¨Ó°µ±Æ¦C
¦Ó¤£¬O«ü©w¤À­¶

TOP

¦^´_ 13# lichang


Private Sub CommandButton1_Click()
Dim C&, i&
With Sheets("Sheet1")¡@
¡@¡@¡@C = .Cells(1, Columns.Count).End(xlToLeft).Column + 1
¡@¡@¡@For i = 1 To 3: .Cells(i, C) = UserForm1("TextBox" & i): Next
¡@¡@¡@Range(.[B1], .Cells(3, C)).Sort Key1:=.[B1], Order1:=xlAscending, Header:=xlNo, _
¡@¡@¡@¡@¡@OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight
End With
End Sub

ª`·N¬õ¦âªº . ¤£¥iº|±¼¡ã¡ã

TOP

¦^´_ 14# ­ã´£³¡ªL

¤j¤j¡A¤p§Ì¯uªº«Ü¤£¤~¡A·Q®³±zªºµ{¦¡½X¨Ó­×§ï¡A¦ý¬O¤@ª½¨S¿ìªk¤F¸Ñ¯u¿Í
«ç»ò§ï³£¤@ª½µo¥Í¿ù»~¡A±z¤è«K¸ò§Ú»¡¤@¤U«ç»ò§ï¶Ü??
¥H¤U¬O§Ú­×§ïªºµ{¦¡½X

With Sheets("¤u§@ªí2")
      C = .Cells(10, Columns.Count).End(xlToLeft).Column + 1
      Range(.[C10], .Cells(15, C)).Sort Key1:=.[C10], Order1:=xlAscending, Header:=xlNo, _
          OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight




¥¼©R¦W.jpg

TOP

¦^´_ 15# lichang


Sub TEST()
Dim C&
With Sheets("¤u§@ªí2")
¡@¡@¡@C = .Cells(10, Columns.Count).End(xlToLeft).Column + 1
¡@¡@¡@Range(.[C10], .Cells(15, C)).Sort Key1:=.[C10], Order1:=xlAscending, Header:=xlNo, _
¡@¡@¡@¡@¡@OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight
End With
End Sub

¥H¤W´ú¸Õ¢Ý¢Ù¡A¤£¹L§Ú¬OOFFICE 2000¡A
±z¥i¨Ï¥Î¿ý»s¤è¦¡¨ú±o¡e¾î¦V±Æ§Ç¡fµ{¦¡½X¡A¦A®M¦Ü Sort ¨º¦æ¬Ý¬Ý¡ã¡ã

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2015/11/25 08:01): ªþÀɬݬÝ

§Ú´ú¸Õ¹L¤F¡A§Úµo²{¬O©ñ¦b¼Ò²Õ¤¤¨Ï¥Î´N¥i¥H¤F¡A¦ý¬O§Ú°µ¦Aªí³æ¤¤¡A´N¦³°ÝÃD¤F!!!!

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD