Home > other >  Vba, my character is more, it is said that Array can't branch, how should deal with excuse me?
Vba, my character is more, it is said that Array can't branch, how should deal with excuse me?

Time:02-23

I need on pieces of paper, find out the following words, my online looking for VBA, character can be less, not how long word stock, it is said that Array can't branch, how should deal with excuse me?




Sub neo-philosophy ()
Dim As Integer I
Dim MyKeys
'build to bai set text color array
MyKeys=Array("妯","碡","轴","鵙","局","菊","橘","局","镞","卒","族","足","术","竺","舳","筑","躅","烛","逐","竹","俗","秫","塾","孰","赎","熟","蹼","濮","醭","璞","仆","觳","斛","鹘","骨","氟","讣","茯","艴","怫","黻","蝠","匐","洑","绂","祓","绋","佛","幞","袱","辐","幅","拂","伏","服","福","顿","髑","黩","讟","椟","渎","犊","牍","独","毒","读","裼","隰","檄","熄","锡","媳","袭","习","席","殛","戢","鶺","蒺","踖","墼","芨","嫉","藉","革","亟","棘","汲","岌","笈","唧","脊","辑","楫","瘠","籍","急","及","即","吉","集","疾","级","极","靮","蹢","嫡","镝","翟","觌","籴","狄","迪","荻","的","涤","笛","敌","荸","踯","摭","埴","掷","跖","侄","职","执","殖","植","值","直","什","十","拾","蚀","识","实","食","石","噱","学","絜","勰","颉","胁","协","苶","倔","爝","劂","桷","攫","觖","孓","珏","玦","潏","鴂","獗","鐍","屩","噱","橛","掘","嚼","抉","崛","蕨","厥","谲","诀","爵","绝","决","觉","脚","颉","拮","桔","讦","桀","撷","疖","孑","诘","碣","睫","捷","劫","竭","截","节","杰","洁","结","跕","咥","垤","昳","瓞","鲽","耋","蹀","喋","碟","谍","堞","牒","迭","叠","蝶","蹩","别","晢","蜇","翟","辙","辄","磔","蛰","宅","谪","折","哲","啧","咋","鲗","舴","帻","赜","择","贼","泽","则","折","舌","揢","壳","咳","鹖","盍","纥","貉","龁","阖","翮","核","劾","盒","涸","鬲","嗝","膈","轕","骼","蛤","隔","葛","革","阁","格","额","德","得","作","昨","浞","鷟","诼","擢","缴","琢","啄","着","茁","濯","斫","浊","酌","橐","膜","帼","掴","国","佛","凙","铎","夺","铂","僰","襮","餺","镈","荸","浡","孛","渤","鹁","怫","礴","踣","搏","钹","勃","雹","膊","舶","帛","驳","箔","柏","百","白","薄","伯","喋","轧","炸","扎","札","闸","砸","杂","挟","呷","黠","柙","硖","狎","辖","匣","狭","侠","恝","鵊","蛱","戛","颊","荚","铗","浃","划","猾","轧","茷","垡","阀","筏","罚","伐","乏","笪","鞑","繨","瘩","怛","答","达","察","魃","茇","跋","拔","滑","夹","捽","瘃","蠋","鹄","茀","纛","鼻","絷","穴","撷","缬","矍","角","楬","摺","责","曷","合","笮","镯","灼","活","卜","哳","铡","扎","摘","诎","蛐","屈","曲","鞫","踘","鞠","掬","锔","屋","突","秃","叔","菽","淑","噗","仆","扑","窟","哭","歘","唿","惚","忽","揖","壹","腊","晳","螅","蟋","窸","晰","蜥","淅","析","膝","悉","吸","夕","惜","昔","息","踢","剔","缉","嘁","漆","戚","柒","七","霹","劈","襀","唧","咭","屐","击","绩","激","迹","积","滴","逼","织","汁","只","虱","湿","失","吃","哕","曰","约","噎","薛","削","楔","蝎","歇","帖","贴","阙","缺","切","瞥","撇","捏","撧","撅","揭","接","跌","憋","鳖","蛰","着","搕","颏","瞌","客","嗑","喝","咯","纥","疙","胳","割","鸽","作","棁","卓","涿","拙","捉","桌","饦","托","脱","缩","说","朴","泼","摸","啯","蝈","郭","剟","踔","裰","咄","掇","撮","戳","戌","鲅","钵","拨","剥","扎","咂","匝","押","压","鸭","瞎","挖","禢","铩","煞","杀","撒","掐","邋","浃","夹","栝","刮","发","大","耷","褡","嗒","搭","答","锸","插","擦","八"
)

Dim TotalRange As Range
Dim ThisRange As Range
'specified to set the cell area
The Set TotalRange=[A1: A29]
'the use cycle begins setting
For Each ThisRange TotalRange In
For I=0 To UBound (MyKeys)
'call the custom process
Call MyReplace (ThisRange, MyKeys (I))
Next I
Next

End Sub

'the custom process, to specify the text in the cell is set to red
Sub MyReplace (ByVal MyRange As Range, ByVal MyKey As String)
Dim LinStr As String
Dim As Integer L
Dim As Integer I

L=Len (MyKey)

LinStr=MyRange. Text
I=InStr (1, LinStr, MyKey)
The Do While I & lt;> 0
MyRange. Characters (Start:=I, Length:=L). The Font, Color=RGB (255, 0, 0)
I=InStr (I + L, LinStr MyKey)
Loop

End Sub