Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Method or data member not found

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Method or data member not found


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
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
Compile error: Method or data member not found Brian Day Excel Worksheet Functions 0 July 22nd 07 03:20 AM
Method of Data Member not found TroyH[_4_] Excel Programming 1 September 6th 04 11:36 PM
"Member not found" exception...Help! Nick Chadwick[_2_] Excel Programming 0 July 25th 04 03:19 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM
"Member Not Found" Error with Excel 2000 Paul Excel Programming 2 August 14th 03 03:22 PM


All times are GMT +1. The time now is 01:51 AM.

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

About Us

"It's about Microsoft Excel"