我有一个问题,直到现在我都无法解决。我在表格上放了一个按钮。如果不写代码。我可以毫无问题地点击它。如果我编写了一些代码然后注释此代码,我会收到此错误:未定义子或函数。我怎么解决这个问题?
Private Sub Command40_Click()
'Dim fso As New FileSystemObject
'Dim ts As TextStream
'Dim Name, Line As String
'Dim regn As New regexp
'Dim regx As New regexp
'Dim regend As New regexp
'Dim regxnum As New regexp
'Dim swknnf As Boolean
'Dim matchkennfeld, matchstx, matchend, matchxnum As MatchCollection
' Name = util1.fDateiName("*.DCM", "Text")
' Set ts = fso.OpenTextFile(Name, ForReading)
'Do While Not ts.AtEndOfStream
' set Line = ts.ReadLine
'regn.Pattern = "KENNFELD\s+([A-Z 0-9]*)"
' regx.Pattern = "\s*(ST/X)\s*([0-9]*\.[0-9]*\s*)+"
' regxnum.Pattern = "\s*[0-9]*\.[0-9]*\s*"
' regend.Pattern = "\s*(END)\s*"
' Set matchkennfeld = regn.Execute(Line)
' Set matchstx = regx.Execute(Line)
' Set matchend = regend.Execute(Line)
' If matchkennfeld.Count <> 0 Then
' swknnf = True
' End If
' If matchend.Count <> 0 Then
' swknnf = False
' End If
' If matchstx.Count <> 0 And swknnf = True Then
' Set matchxnum = regxnum.Execute(Mid(Trim(matchstx.Item(0)), 5))
' For Each Match In matchxnum
' MsgBox Match
' Next Match
' End If
'Loop
End Sub