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

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

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

¥»©«³Ì«á¥Ñ lichang ©ó 2015-10-30 22:45 ½s¿è

½Ð°Ý¦U¦ì¤j¤j¡A§Ú»s§@¤F¤@­Óªí³æ¡A·Q­nÅý«È¤á¥i¥H¦Û¦æ¥[¤J·s°¨¹F
§Ú¸Ó¦p¦ó¼¶¼g¡AÅý«È¤á¶ñ¼g§¹¦¨ªº¸ê®Æ«á¡A¦Û°Ê´¡¤J¨ìªÅ¥Õªº¶ñªÅ®æ¡A(¦pC1,C2,C3®æ)¡A©ÎªÌ±Æ¨ìE1,E2,E3
µM«á¦A«ö·Ó°¨¹F³W®æ¤j¤p±Æ¦C¶¶§Ç??
¦p¤U¹Ï


·s¼W Microsoft Excel ¤u§@ªí.rar (6.25 KB)

¦Û³»¤@¤U!!³Â·Ð¤j¤j´eªºÀ°¦£!!

TOP

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

¤£¦n·N«ä¡A¥i¯à¤§«eÀɮצ³°ÝÃD¡A§Ú­«·s©ñ¸mÀÉ®×»P¥Î¹Ï¥Ü¤è¦¡¸ÑÄÀ¦n¤F
  ­ì©l¸ê®Æ
¥¼©R¦W.jpg   ¶}±Ò¹ï¸Üµøµ¡¡A¨Ã¿é¤J¸ê®Æ
  ¬d¸ß¦³ªÅ®æ¡A¶ñ¤J¸ê®Æ
  ¦]°¨¹F½s¸¹¤j¤p¤£¤@¡A­«·s¦w±Æ¤@¦¸!!µ²§ô


·s¼W Microsoft Excel ¤u§@ªí.rar (17.14 KB)

TOP

¦^´_ 4# lichang

¸Õ¸Õ¡I
  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. End Sub
½Æ»s¥N½X

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

ÁÂÁ¦U¦ì¤j¤jÀ°¦£¡A§Ú´ú¸Õ¤@¤U

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

¦^´_  lichang


    À°¸É¦Û°Ê±Æ§Ç
owen06 µoªí©ó 2015-11-4 09:48



¤j¤j¡A§Ú´ú¸Õ«á¡A±Æ¦C¶¶§Çµo¥Í°ÝÃD¡A¦]¬°¥L¬O§âª½±Æ¾ã­Ó­«·s±Æ¦C¡A¦ý¬O¥ª¥k¶¶§Ç¨S¦³ÅܤÆ
§Ú¬O§Æ±æ¥ª¥k±Æ¦C¶¶§Ç­n§ó´«¡A±Æ¦CÀu¥ý¬O°¨¹F³W®æ¡B½s¸¹¡BÅX°Ê¾¹

TOP

Private Sub CommandButton1_Click()
Dim C&, i&
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 Sub

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD