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

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

¦^´_ 2# lichang


    §A¦pªG¯à°÷±Ô­zªº§ó©ú½T¤@ÂI¡A¬Æ©ÎÁ|¥X§¹¾ãªº¨Ò¤l¨Ó¡A¤j®a·|¤ñ¸û¦nÀ°¦£§A¡A
    ¦]¬°§A»¡©úªº¤Ó¤Ö¤F¡AÅý¤HºN¤£µÛÀYºü¡A¤£ª¾¹D¸Ó¦p¦óÀ°¦£¡C

TOP

¦^´_ 4# lichang


    À°¸É¦Û°Ê±Æ§Ç
  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, [XFD3].End(1).Column)).Select
  8. Selection.Sort Key1:=Range("B1"), Order1:=xlAscending
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# lichang


    ¹ï¤F¡A¦pªG§Aªºoffice¬O2003ªº¡A¨º
    Range(Cells(1, 2), Cells(3, [XFD3].End(1).Column)).Select
    ­n§ï¦¨
    Range(Cells(1, 2), Cells(3, [iv3].End(1).Column)).Select
    ¤~¤£·|¶W¥X½d³ò

TOP

¦^´_ 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

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD