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

¦r¦ê¤¤¬Y´X­Ó¦r¤¸Åܦâ

¦^´_ 10# rph
  1.     Private Sub CommandButton1_Click()
  2. Dim A As Range
  3. fc = InputBox("¿é¤J¦r¦ê", , "A") '¿é¤J±ý·j´M¦r¤¸
  4. s = Len(fc) '¿é¤J¦r¦êªº¦r¤¸¼Æ
  5. For Each A In UsedRange '¦b«ö¶s©Ò¦b¤u§@ªíªº¤w¨Ï¥ÎÀx¦s®æ¤¤§@°j°é
  6.    k = InStr(A, fc)  '±ý·j´M¦r¤¸¦bÀx¦s®æ¤¤²Ä´X­Ó¦r¤¸¥X²{
  7.    If k > 0 Then A.Characters(k, s).Font.ColorIndex = 3  'K>0ªí¥Ü¦³³o­Ó¦r¦ê¦s¦b¡A´N±NÀx¦s®æ²Äk¦r¤¸¶}©l¨ús­Ó¦r¤¸ªø«×§ï¬°¬õ¦â¦rÅé
  8. Next
  9. End Sub
½Æ»s¥N½X
§A¥²¶·§ï±¼usedrange¤~¯à¨Ï¥Î¡AÀ³¸Ó¬O§Aªºµ{¦¡¬O¼g¦b¤@¯ë¼Ò²Õ¡A¤£¬O¤u§@ªí¼Ò²Õªº­ì¦]
§ï¦¨ActiveSheet.UsedRange´N·|¥h§â§@¥Î¤¤ªº¤u§@ªí©Ò¦³³Q¨Ï¥ÎÀx¦s®æ°µÀˬd
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i¦æµ½­n¤Î®É¡j¦æµ½­n¤Î®É¡A¥\¼w­n«ùÄò¡C¦p¿N¶}¤ô¤@¯ë¡A¥¼¿N¶}¤§«e¤d¸U¤£­n°±º¶¤õ­Ô¡A§_«h­«¨Ó´N¤Ó¶O¨Æ¤F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD