- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
5#
發表於 2015-9-1 10:04
| 只看該作者
- Sub CommandButton1_Click()
- Dim i As Integer, A As Integer, C As Integer
- With Range("I65536").End(xlUp).Offset(1)
- .Cells = [H1]
- i = 1
- Do
- A = IIf(i = 1, i, i + 1)
- i = Application.WorksheetFunction.Find(",", .Cells, i + 1)
- C = [H1].Characters(Start:=A, Length:=i - A).Font.ColorIndex
- .Characters(Start:=A, Length:=i - A).Font.ColorIndex = C
- Loop Until i >= Len(.Cells)
- End With
- End Sub
複製代碼 |
|