Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Doesn't recognize worksheet

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Doesn't recognize worksheet

Give this a try...

For Each Wksht In ActiveWorkbook.Worksheets
--
HTH...

Jim Thomlinson


"davegb" wrote:

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!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Doesn't recognize worksheet

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,
--
George Nicholson

Remove 'Junk' from return address.


"davegb" wrote in message
oups.com...
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum to recognize new rows deb Excel Discussion (Misc queries) 3 January 27th 10 09:50 PM
Excel does not recognize text in a worksheet Julie D[_2_] Excel Discussion (Misc queries) 1 April 26th 08 04:41 PM
VBA does not recognize Excel worksheet function "indirect" Todkerr Excel Programming 3 October 12th 05 08:51 PM
Recognize #div/0! JOn Kunces via OfficeKB.com Excel Discussion (Misc queries) 1 July 14th 05 04:18 PM
recognize formatting Stan Altshuller Excel Worksheet Functions 1 March 30th 05 01:01 AM


All times are GMT +1. The time now is 11:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"