correct the vba7 syntax errors below:…
- User
correct the vba7 syntax errors below:
'------------------------------------------------------------------- ' Copy rows whose [authentication] field is NOT an IP address '------------------------------------------------------------------- Private Function CopyFilteredAuthRows( _ ws As Worksheet, _ ByVal cDate As Long, _ ByVal cHost As Long, _ ByVal cAuth As Long, _ ByVal origLR As Long, _ ByVal ipPattern As String) As Long
codeDim i As Long Dim outR As Long Dim auth As String outR = 2 For i = 3 To origLR + 1 auth = Trim$(ws.Cells(i, cAuth).Value) If auth <> "" And Not (auth Like ipPattern) Then ws.Cells(outR, 1).Resize(1, 3).Value = _ Array(ws.Cells(i, cDate).Value, _ ws.Cells(i, cHost).Value, _ auth) outR = outR + 1 End If Next i CopyFilteredAuthRows = outREnd Function
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.