Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why do i get this error
Thank You Esau Sub aaa() ' Dim rng As Range, sh As Worksheet WhatToFind = ActiveCell.Value For Each sh In Workbooks.Worksheets 'Highlights .W orksheets Error Method or Data member not found sh.Activate Set rng = Cells.Find(What:=WhatToFind, _ After:=Range("IV65536"), _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByColumns, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) If Not rng Is Nothing Then rng.Select ans = MsgBox("continue searching? ", vbYesNo) If ans = vbNo Then Exit Sub End If Next End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Esau, change the line in your code from For Each sh In *Workbook*.Worksheets to For Each sh In *ActiveWorkbook*.Worksheets and it should work Regards Seamu -- SO ----------------------------------------------------------------------- SOS's Profile: http://www.excelforum.com/member.php...nfo&userid=540 View this thread: http://www.excelforum.com/showthread.php?threadid=26138 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile error: Method or data member not found | Excel Worksheet Functions | |||
Method of Data Member not found | Excel Programming | |||
"Member not found" exception...Help! | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming | |||
"Member Not Found" Error with Excel 2000 | Excel Programming |