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

[µo°Ý] ¦p¦óÅý¤U©Ô¿ï³æ¿ï¨ú«á¦Û°Ê¸õ¨ìÀx¦s®æ¬Û¹ïÀ³³B?

[µo°Ý] ¦p¦óÅý¤U©Ô¿ï³æ¿ï¨ú«á¦Û°Ê¸õ¨ìÀx¦s®æ¬Û¹ïÀ³³B?

¬Û¤ù¿é¥X»ù¥Øªí.rar (23.49 KB)
¦b³W«h¦WºÙ¤U©Ô¿ï³æ¿ï¨ú«á¡A¦p¦ó¦Û°Ê¸õ¨ì¬Û¹ïÀ³ªº¼Æ¶q°Ï¡H

¨Ò¦p¡G
ÂI¤@¤UA2~·|¥X²{¤U©Ô¿ï³æ¡A¿ï¨ú«á~¦p¦ó¦Û°Ê¸õ¨ìC2¡H
µM«á¦³¦hµ§¸ê®Æ®É¡A·|Ä~ÄòÂI¤@¤UA3¡A·|¥X²{¤U©Ô¿ï³æ~¿ï¨ú«á~¦p¦ó¦Û°Ê¸õ¨ìC3¡H

¦^´_ 44# c_c_lai

ÁÂÁ»¡©ú¡A¤w¸g¤F¸Ñ°ÝÃD©Ò¦b
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 41# ML089
A2:A25 ªºÄæ¦ì»P ComboBox1:ComboBox ¬O¬Û¤¬¨Ì¦sªº¡C
Äæ¦ì¸ê®Æªº¸ê®ÆÅçÃÒ¡A¤@¯ëÀ³¥Î©ó´ú¸Õ¸ê®Æ¤ÎÅçÃÒ¡A¥H½T»{¹B§@¥¿½TµL»~¡C
¦¹³B¤§¹B¥Î¬O¨Ï¥Î "¨Æ¥ý³]©wªº²M³æ½d³ò ("=Sheet1!$A$3:$A$20")" °µ¬°
¸ê®ÆÅçÃÒªº¤º¦s­È¡A´£¨Ñµ¹«áÄò³B²z¤§ ComboBox1 ªº LinkedCell¡B¥H¤Î
ListFillRange ¸ê°T¡C LinkedCell¹ïÀ³ªº¬O¨Ï¥ÎªÌ¥Ø«eÂI¿ïªº A Äæ¦ì¡A
Ä´¦p¥Ø«e¬O¦ì©ó A4 Äæ¦ì¡A«h¦¹³B LinkedCell ¹ïÀ³ªº¤º®e­È¬° $A$4¡A
¦P®É ListFillRange ¹ïÀ³ªº¤º®e­È«h¬° Sheet1!$A$3:$A$20¡C
³o®É¨Ï¥ÎªÌ¦pÂI¿ï "¤U©Ô²Å¸¹"¡AComboBox1 «hÀH§Y®i¶} ListFillRange
¹ïÀ³ªºÄæ­È (A2:A25 ªºÄæ­È¤º®e) ²M³æ¨Ñ¨Ï¥ÎªÌÂI¿ï¡C
ÂI¿ï§¹¦¨«áÀH§Y¦Û°Ê±NÂI¿ïÄæ­È¼g¤J¨ì LinkedCell ¹ïÀ³ªºÄæ¦ì¤º¡C
Á`µ²¡BÀ³¥Î CellValidation() ±N "=Sheet1!$A$3:$A$20" ¦P®É¼g¤J¦Ü
A2:A25 ªº .Validation.Formula1¡AµM«á¦A§Q¥Î¦¹¸ê®ÆÅçÃÒ¤@¤@±a¤J¨ì
¨C¦¸°õ¦æªº ComboBox1 ¤¤¡C
(¦p¦¹¡BA2:A25 ¥H¤Î ComboBox1 ³£¥i¤£¥Î¨Æ¥ý¥h°µ¥ô¦ó³]©w­Èªº°Ê§@¡A
¦Ó¥þ³¡¥æ¥Ñ CellValidation() ¥h³B²z¡B¤Îµ¹­È¡C)
¦p¦¹»¡©ú¬O§_¹ï§A¦³©Ò§U¯q¡H

TOP

¦^´_ 41# ML089
§O«È®ð¡A¤j®a¤¬¬Û¾Ç²ß¡C
¬Ý¤F§A»P stillfish00 ¤j¤jªº°T®§¡A¥çÅý§Ú±q¤¤¾Ç²ß¨ì«Ü¦h§Ú¨S·Q¨ìªº¬ðµoª¬ªp¡A
¦]§Ú¤£¬O­ì³ÐªÌ (av8d ¤j¤j) ©Ò¥H¥u³æ¯Âªº®M¥Î²{¦¨ªºµ{¦¡ (¦]­ì¥»¥u¬O¨ó§U av8d ¸Ñ¨M¥Lªº´£°Ý)¡A
³º¨S·Q¨ì·|ªu¥Í¥X ActiveCell.Validation.Formula1 ªº²§ª¬¡C­è­è±q¥~ÀY¦^¨ì®a¬Ý¤F§A­Ìªº¹ï½Í¤º®e¡A
¤£¸T¥ç·Q¨ì¬°¦ó¤£¥h¨Ï¥Î¥Ñ stillfish00 ¤j¤j´£¨Ñªº CellValidation() ¡A¦b StrVdFml §PÂ_¤§«e¥[¤J¥¦¡A
³o»ò¤@¨ÓºÞ¥¦­ì¥»ªº ActiveCell.Validation.Formula1 ¦³§_¸ê®Æ¡A©ó CellValidation() °õ¦æ«á¡A
¥¦«K¦Û°Ê§â A2:A25 ªº¸ê®ÆÅçÃÒ¸ê®Æ¤@¤@¼g¤J "=¤u§@ªí1!$A$3:$A$20" ³sµ²°Ñ³y¦r¦ê¡C
¦p¦¹¤@¨Ó±µ¤U¨Óªº§@·~«Kªï¤b¦Ó¸Ñ¤F¡C

TOP

¬Ý¤F ML089, c_c_lai,stillfish00¤T¦ìªº°Q½×,ÃöÁä¬Oª©Excel¶}±Ò·sª©Àɮתº±±¨î¶µ¬OµLªk¨Ï¥Î.
§Ú¬O2003ª©´N±`¹J³oª¬ªp,¸Ñ¨M¤è¦¡
±N·sª©Àɮתº¸ê®Æ½Æ»s(¤å¦r,®æ¦¡,¤£§t±±¨î¶µ)¦b¤@·s¼Wª©¬¡­¶Ã¯,(ª©±±¨î¶µ¦A¤@¤@·s¼W¤W¥h,µ{¦¡½X½Æ»s¨ìVBA¸Ì)
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 38# c_c_lai

§Ú¤U¸ü§A´£¨ÑªºÀɮסASheet2!AÄæ ¬O¨S¦³³]©w ¸ê®ÆÅçÃÒ²M³æ¡A
©Ò¥H Worksheet_SelectionChange §PÂ_©Ò¿ïÀx¦s®æ¨S¦³³]©w ¸ê®ÆÅçÃÒ²M³æ¡A´N¨S¦³§@¥Î

­«³] ¸ê®ÆÅçÃÒ²M³æ Àx¦s¡A¦b¥´¶}¤´·|¦s¦b¡C

µ{¦¡¤¤¦³¤U­±³o¤@¬q¡A¦ý³£¨S¦³³Q©I¥s¡A§Ú¤]¨S¦³¥J²Ó¬ã¨s¡A©Ò¥H¤@ª½¥H¬°VBAÀ³¸Ó·|±N  ¸ê®ÆÅçÃÒ²M³æ ¦Û°Ê³]¦n¡C
Sub CellValidation()      '  stillfish00 ´£¨Ñ
    With Sheets("Sheet2").[A2:A25].Validation
        .Delete
        .Add Type:=xlValidateList, Formula1:="=Sheet1!$A$3:$A$20"
    End With
End Sub

¥H³o¨Ò¤l¥i¯à¤@¶}©l¬O¨Ï¥Î  ¸ê®ÆÅçÃÒ²M³æ ¡A«á¨Ó§ï¥ÎCOMBOBOX¨Ó´À¥N ¸ê®ÆÅçÃÒ²M³æ¡A
Åý§Ú¤@ª½·d¤£²M·¡(VBA¥\¤O¤Ó®z)¡A¬JµM¨Ï¥ÎCOMBOBOX¨Ó·í ÅçÃÒ²M³æ¡A¬°¦ó¤S­n³]©wÀx¦s®æªº  ¸ê®ÆÅçÃÒ²M³æ¡A
·Pı2­Ó¬Û¦P¥\¯à¤¬Å|¦b¤@°_¡C
Á`¤§ÁÂÁ§A¤@ª½­@¤ß¦^ÂЧڪº°ÝÃD¡A·PÁÂ
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 36# stillfish00
  1. Sub CellValidation()      '  stillfish00 ´£¨Ñ
  2.     With Sheets("Sheet2").[A2:A25].Validation
  3.         .Delete
  4.         .Add Type:=xlValidateList, Formula1:="=Sheet1!$A$3:$A$20"
  5.     End With
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_ 35# ML089
¦^´_ 34# stillfish00
³Ì²¼ä§Ö³t¡B¥¿½Tªº¸Ñ¨M¤è¦¡¦p¤U¡A½Ð­×¥¿¡G
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2.     Dim StrVdFml As String
  3.    
  4.     On Error Resume Next
  5.         CellValidation                  '  2013/11/7  ¼W­× by  stillfish00

  6.         StrVdFml = Replace(ActiveCell.Validation.Formula1, "=", "")
  7.         ActiveCell.Validation.InCellDropdown = False
  8.     On Error GoTo 0
½Æ»s¥N½X

TOP

¦^´_  stillfish00


§Ú¤U¸üªºÀɮ׸̬O¨S¦³³] ¸ê®ÆÅçÃÒ²M³æ¡A©Ò¥H¥u­n³]©w¤F  ¸ê®ÆÅçÃÒ²M³æ ´N°õ¦æµL»~ ...
ML089 µoªí©ó 2013-11-7 11:06

²z½×¤W¡A¥u­n¦b²Ä¤@¦¸³]©w¤F  "¸ê®ÆÅçÃÒ²M³æ"¡A¨Ã¦P®É¤©¥HÀx¦s¡A
Ãö³¬«á¦A¦æÆ[¹î "¸ê®ÆÅçÃÒ²M³æ" ¤w§_·~¤w¦s¦b¡A«Kª¾µª®×¤F¡C

TOP

¦^´_ 33# ML089
°²³]§A¹q¸£¦w¸Ëªº§@·~¨t²Î¬O Win7 64 Bits¡A
Office ¦pªG¬° 64 Bits¡A «h«Øij§A¨Ï¥Î (¦w¸Ë) 32 ¦ì¤¸ªº Office¡A
¥H§K²£¥Í¤ä´©¤Wªº§Þ³N°ÝÃD¡C¦P²z¡B¦p¬° 2007 ¥ç¦p¤W­z«Øij¡C

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD