返回列表 上一主題 發帖

[發問] 請問如何用正規表示,將特殊字元視為字串的一部分?

回復 1# ychuang

Public Sub instr_()
    Dim str1 As String
    str1 = "don't"

    For Row = 1 To 10
        For col = 1 To 10
            If (InStr(1, Cells(Row, col), str1)) Then
                Range(Cells(Row, col), Cells(Row, col)).Select
            End If
        Next
    Next

End Sub

TOP

        靜思自在 : 布施如播種,以歡喜心滋潤種子,才會發芽。
返回列表 上一主題