D
davegb
I've written the following:
Sub CountReasonContactCode()
Dim Wksht As Worksheet
Dim rReason As Range
Dim lRow As Long
Dim lCurRow As Long
Dim rCell As Range
Dim l16Rct As Long
Dim l16Act As Long
Dim l16BGct As Long
Dim lCt As Long
lRow = 107
l16Rct = 0
l16Act = 0
l16BGct = 0
Set rReason = ActiveSheet.Range("D8", Cells(lRow, "D"))
rReason.Select
For Each rCell In rReason
If rCell = "13" Then
lCt = InStrucase(1, rCell.Offset(0, 2).Value, "R")
If lCt > 0 Then
l16Rct = l16Rct + 1
lCt = 0
End If
(rest of code not shown)
I'm getting a compile error on "InstrUcase". I Googled here, and looked
for a "missing" component in VBE references. None there. What is
causing this? I know it's not the instr because without the ucase it
works fine. I looked for ucase in VBE help, and it isn't there. Not
sure this means anything because lots of VBA
command/function/properties aren't listed in help.
Thanks for the help.
Sub CountReasonContactCode()
Dim Wksht As Worksheet
Dim rReason As Range
Dim lRow As Long
Dim lCurRow As Long
Dim rCell As Range
Dim l16Rct As Long
Dim l16Act As Long
Dim l16BGct As Long
Dim lCt As Long
lRow = 107
l16Rct = 0
l16Act = 0
l16BGct = 0
Set rReason = ActiveSheet.Range("D8", Cells(lRow, "D"))
rReason.Select
For Each rCell In rReason
If rCell = "13" Then
lCt = InStrucase(1, rCell.Offset(0, 2).Value, "R")
If lCt > 0 Then
l16Rct = l16Rct + 1
lCt = 0
End If
(rest of code not shown)
I'm getting a compile error on "InstrUcase". I Googled here, and looked
for a "missing" component in VBE references. None there. What is
causing this? I know it's not the instr because without the ucase it
works fine. I looked for ucase in VBE help, and it isn't there. Not
sure this means anything because lots of VBA
command/function/properties aren't listed in help.
Thanks for the help.