Doesn't recognize worksheet

D

davegb

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
Dim lTotNameRow As Long



lRow = 107
lTotNameRow = 4
l16Rct = 0
l16Act = 0
l16BGct = 0

For Each Wksht In ActiveWorkbook <---ERROR

Doesn't recognize method or property error
Any suggestions?
Thanks!
 
G

George Nicholson

A Worksheet is not a member of Workbook (Workbook isn't a collection and has
no members).
A Worksheet is a member of the ActiveWorkbook.Worksheets collection.

For Each Wksht In ActiveWorkbook.Worksheets

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top