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

[µo°Ý] Äæ¦ì½Æ»s°ÝÃD ³Â·Ð敎§Ú¤@¤U ÁÂÁÂ!

[µo°Ý] Äæ¦ì½Æ»s°ÝÃD ³Â·Ð敎§Ú¤@¤U ÁÂÁÂ!

°²³]§Ú¦bsheet1ªºA1Äæ¦ì¿é¤J"123"

µM«á¦bsheet1«Ø¥ß¤@­ÓCommandButtonªºª«¥ó

·í«ö¤Ubutton®É¡A¥L·|±NA1Äæ¦ìªº¼Æ­È½Æ»s¨ìsheet2ªºA1Äæ¦ì

¦pªGsheet1ªºA1Äæ¦ì§Ú§ï¦¨"456"

«ö¤Ubutton®É¡A·|±N"456"ªº¼Æ­È½Æ»s¨ìsheet2ªºA2Äæ¦ì

½Ð°Ý¦³¤°»ò¤èªk¯à¹F¨ì§Úªº¥Øªº©O ÁÂÁÂ!

¦^´_ 1# lorlcool
  1. Private Sub CommandButton1_Click()
  2.     With Sheet1.[a1]
  3.         If .Value = 123 Then
  4.             Sheet2.[a1] = .Value
  5.         ElseIf .Value = 456 Then
  6.             Sheet2.[a2] = .Value
  7.         End If
  8.     End With
  9. End Sub
½Æ»s¥N½X

TOP

¤£¦n·N«ä¡A·PÁ¤j¤jªº¸Ñµª¡A¥i¯à¬O§Úªí¹Fªº¤£¦n

§Ú·Q°µªº¬O¡A§Ú¦bsheet1¤W«Ø¥ß¤F¨â­Ó«ö¶s¡A¤À§O¬OP©MF

·í§Ú«ö¤UP®É¡A«h¦bsheet1ªº("B1")Åã¥ÜPass¡A¦Ó·í§Ú«ö¤UF®É¡A«h¦bsheet1ªº("B1")Åã¥ÜFail

¦P®É§Ú¦bsheet1¤]¦³«Ø¥ß¤@­Ó«ü¥O«ö¶s(CommandButton)

·í§Ú«ö¤UCommandButton·|±N§Ú­è­è¿ï«Ø¥ßªº¨â­Ó«ö¶s(P©ÎF)©ÒÅã¥Ü¦bsheet1¤¤("B1")ªº¦r½Æ»s¨ìsheet2ªº("A2")¤W

°²³]§Ú²Ä¤@¦¸«öP¡A¦A«öCommandButton¡A·|¦bsheet2ªºA2¤WÅã¥ÜPass

²Ä¤G¦¸§Ú¦A«öF¡A¦A«öCommandButton«á¡A·|¦bsheet2ªºA3¤WÅã¥ÜFail

­«½Æªº¸Ü¡A´N²Ä¤T¦¸§Ú¦A«öF¡A¦A«öCommandButton«á¡A·|¦bsheet2ªºA4¤WÅã¥ÜFail

¥H¦¹Ãþ±À¡A¦³¥i¯à·|¦³¦n´X²Õ...¥Øªº´N¬O·QÅý§Ú¨C¦¸ªºPass©ÎFail³£¯à°÷¬ö¿ý¤U¨Ó

³Â·ÐÀ°§Ú£¸§â ÁÂÁ§A!

TOP

¦^´_ 3# lorlcool
  1. Private Sub CommandButton1_Click() 'P«ö¶s
  2. [B1] = "Pass"
  3. End Sub

  4. Private Sub CommandButton2_Click() 'F«ö¶s
  5. [B1] = "Fail"
  6. End Sub

  7. Private Sub CommandButton3_Click() 'Àx¦s
  8. Sheet2.[A65536].End(xlUp).Offset(1, 0) = [B1]
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¸Ñ¨M¤F ·PÁ¤j¤jÀ°¦£

­è¤J¤â ©Ò¥H¤£¬O«ÜÀ´¡A§Ú·|¥[ªoªº~!

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD