Jag vill kontrollera om en include-tag finns.
Dim regxp As Object, oMatch As Object, MatchC As Object
Set regxp = CreateObject("VBScript.RegExp")
regxp.IgnoreCase = True
regxp.Pattern = "<!--#include file=""common-lib.asp""-->"
Set MatchC = regxp.Execute(txtHtml.text)
Set oMatch = MatchC(0)
txtHtml.SelStart = oMatch.FirstIndex
txtHtml.SelLength = oMatch.Length
txtHtml.SelText = vbCrLf & "<!--#include file=""common-lib.asp""-->" & vbCrLf
Jag får ett error på Set oMatch = MatchC(0).
Hur fixar jag till det?