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

½Ð°ÝÀx¦s®æ¦Û­qªí³æ¥\¯à

½Ð°ÝÀx¦s®æ¦Û­qªí³æ¥\¯à

½Ð°Ý§Ú·Q¦bB2¡ãE2¡BB5¡ãE5¡BB10¡ãD10ªºÀx¦s®æ¤¤
¥u­nÂI¨ì¹ïÀ³Àx¦s®æ¡A«h¥i¼u¥XUserForm1
µM«áA¡BB¡BC¡BD¡BE«h¯à¹ïÀ³¨ìsheet2¤Wªº¸ê®Æ±a¤JªÅ®æ¤¤

¥t¥~¤À§O³]©w«ö¶s³]©wB2¡ãE2¡BB5¡ãE5¡BB10¡ãD10ªºÀx¦s®æ
¹ïÀ³ªºC¡BD¡BE¡]³sµ²¨ìsheet2¡^¦pªG»P³]©wªºL13¡BL14¡BL15
«hB2¡ãE2¡BB5¡ãE5¡BB10¡ãD10ªºÀx¦s®æ·|¥X²{¬õ©³¥Õ¦r

Àx¦s®æ¦Û­qªí³æ.rar (11.01 KB)

Tony

¦^´_ 1# tonycho33
½Ð°Ý§Ú·Q¦bB2¡ãE2¡BB5¡ãE5¡BB10¡ãD10ªºÀx¦s®æ¤¤¥u­nÂI¨ì¹ïÀ³Àx¦s®æ¡A«h¥i¼u¥XUserForm1
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2.     If Not Intersect(Range("B2:E2,B5:E5,B10:E10"), Target) Is Nothing Then UserForm1.Show
  3. End Sub
½Æ»s¥N½X

[ µM«áA¡BB¡BC¡BD¡BE«h¯à¹ïÀ³¨ìsheet2¤Wªº¸ê®Æ±a¤JªÅ®æ¤¤¥t¥~¤À§O³]©w«ö¶s³]©wB2¡ãE2¡BB5¡ãE5¡BB10¡ãD10ªºÀx¦s®æ
¹ïÀ³ªºC¡BD¡BE¡]³sµ²¨ìsheet2¡^¦pªG»P³]©wªºL13¡BL14¡BL15 «hB2¡ãE2¡BB5¡ãE5¡BB10¡ãD10ªºÀx¦s®æ·|¥X²{¬õ©³¥Õ¦r
]
½Ð¦A»¡²M·¡¨Ç

TOP

¦^´_ 2# GBKEE


    ¨Ò¦pÂIB2Àx¦s®æ¡]ggg¡^
«h¼u¥Xuserform
µM«á
A/B/C/D/E ¤U¤è ªÅ®æ±a¥X
B4/A2/5/13/5

µM«á«öC«ö¶sÀ˵ø©Ò¦³²Ä¤TÄæ¬O§_¦³¤p©ó5¡]L13Àx¦s®æªº­È¡^¡A¦pªG¬O¡A´N¸ÓÀx¦s®æ¤Ï¬õ
«öD«ö¶sÀ˵ø©Ò¦³²Ä¤TÄæ¬O§_¦³¤p©ó5¡]L14Àx¦s®æªº­È¡^¡A¦pªG¬O¡A´N¸ÓÀx¦s®æ¤Ï¬õ
«öE«ö¶sÀ˵ø©Ò¦³²Ä¤TÄæ¬O§_¦³¤p©ó8¡]L15Àx¦s®æªº­È¡^¡A¦pªG¬O¡A´N¸ÓÀx¦s®æ¤Ï¬õ
Tony

TOP

¦^´_ 3# tonycho33

¬O§_¦pªþ¥ó®ÄªG
Àx¦s®æ¦Û­qªí³æ.rar (19.18 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh


     §A¦n
´ú¸ÕOK
¦³­Ó°ÝÃD·Q½Ð±Ð
µ{¦¡¤¤ªº¤@¦æ   
Set a = Sheet2.[B2:B12].Find(Target, lookat:=xlWhole)
±qsheet2 ªºB2¡GB12Äæ¦ì·j´M
¦pªG·Q·s¼W sheet2ªºAÄæ¤]¥i¥H·j´M­n¦p¦ó­×§ï
´N¬OAÄæ©Î¬OBÄæ³£¥i¥H

¥t¥~¡A¥i¥H¤£­n«ü©w¨ìB12¶Ü¡H
¥ÎColumns("B")¥i¥H¶Ü
¦ý¬O³o¼Ë·|·j´M¨ìªÅ®æ¡A¾É­P¦bSHEET1ÂI¿ï¨ìªÅ®æ¤]·|¼u¥X
­n¦p¦ó³]©w©O
ÁÂÁÂ
Tony

TOP

¦^´_ 5# tonycho33

¦p¸¯¬O·j´M2Ä檺¸ê®Æ
¨º´N¦A¼W¥[§PÂ_¦b­þ¤@Äæ·j´M¨ì
¤~¯à¥¿½T«ü¥XCÄæ¥H«áªº¸ê®Æ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ tonycho33 ©ó 2012-2-3 09:11 ½s¿è

¦^´_ 6# Hsieh


§Ú·Q¼W¥[AÄæ©ÎBÄæ¨ä¤¤¤@­Ó·j´Mªº¨ìªº¸Ü´N¥i¥HÅã¥Ü
¥t¥~¡ASet a = Sheet31.[F4:F29].Find(Target, lookat:=xlWhole)
·í¤¤ªº[F4:F29]¡A¥i¥H§ï¬°¦C¥X¦³¤å¦r¤º®eÀx¦s®æªº½d³ò´N¦n¶Ü
¨Ò¦p¡A³o¦¸¬O¨ìF29Àx¦s®æ¦³¤º®e¡A¦ý¦pªG¶K¤W§ó·s¸ê®Æ«á,¥i¯à·|¨ìF32µ¥¡A½d³ò­È·|§ó·s¡A¨C¦¸³£¤£¤@¼Ë
ÁÂÁÂ
Tony

TOP

¦^´_ 7# tonycho33

Sheet1¼Ò²Õ
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2. Set Rng = Range("B2:E2,B5:E5,B10:E10")
  3. Rng.Interior.ColorIndex = xlNone
  4. Rng.Font.ColorIndex = xlAutomatic
  5.     If Not Intersect(Rng, Target) Is Nothing Then
  6.     Set a = Sheet2.[A:B].Find(Target, lookat:=xlWhole)
  7.     If Not a Is Nothing Then
  8.    k = 3 - a.Column
  9.     Ar = a.Offset(, k).Resize(, 5).Value
  10.         With UserForm1
  11.     .Show 0
  12.     '¦]¬°TEXTBOX¨Ã¥¼¨Ì§Ç±Æ¦C©Ò¥H¥²¶·¤@¤@µ¹­È
  13.     .TextBox27 = Ar(1, 4)
  14.     .TextBox28 = Ar(1, 5)
  15.     .TextBox29 = Ar(1, 3)
  16.     .TextBox30 = Ar(1, 2)
  17.     .TextBox31 = Ar(1, 1)
  18.     End With
  19.     End If
  20.     End If
  21. End Sub
½Æ»s¥N½X
¤@¯ë¼Ò²Õ
  1. Sub Ex()
  2. Dim Ob As Shape, Ar(), Rng As Range
  3. Set Ob = Sheet1.Shapes(Application.Caller)
  4. Set Rng = Sheet1.Range("B2:E2,B5:E5,B10:E10")
  5. Rng.Interior.ColorIndex = xlNone
  6. Rng.Font.ColorIndex = xlAutomatic
  7. a = Asc(Ob.TextFrame.Characters.Text) + 2
  8. b = Sheet1.Cells(Ob.TopLeftCell.Row, "L").Value
  9. With Sheet2
  10. For Each c In .Range(Chr(a) & 1).EntireColumn.SpecialCells(xlCellTypeConstants)
  11. If c < b Then
  12. For i = 1 To 2
  13. If .Cells(c.Row, i) <> "" Then
  14. ReDim Preserve Ar(s)
  15. Ar(s) = .Cells(c.Row, i)
  16. s = s + 1
  17. End If
  18. Next
  19. End If
  20. Next
  21. End With
  22. If s > 0 Then
  23. For Each d In Ar
  24.   With Rng.Find(d, lookat:=xlWhole)
  25.   .Interior.ColorIndex = 3
  26.   .Font.ColorIndex = 2
  27.   End With
  28. Next
  29. End If
  30. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ tonycho33 ©ó 2012-2-3 10:16 ½s¿è

¦^´_ 8# Hsieh

½Ð°Ý
1.   
Set Rng = Range("B2:E2,B5:E5,B10:E10")¦pªG­n§ï¦¨
Set Rng = Range("B2::E10")
ÂI¿ï½d³ò¤ºªÅ®æ®É¡A¥i¥HÅý¥L¤£­n¼u¥Xµøµ¡¶Ü
2.sheet2ªºA¤ÎBÄæ¦pªG¬O±a¤½¦¡¶i¨Óªº·|µLªk¦bsheet1¤WÅã¥Ü
­n¦p¦ó§ï©O


ÁÂÁÂ
Tony

TOP

¦^´_ 8# Hsieh


    ½Ð°Ý
TextBox27¡ãTextBox31
¸Ì­±ªº¼Æ¦r¥i¥HÅÜÃC¦â¶Ü
¨Ò¦p¡G¤p¾l5´N¤Ï¬õ
ÁÂÁÂ
Tony

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD