Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Find Method

I get the error, "Unable to get the Find property of the Range class",
whenever I use the Find method in Excel VBA. This is my usage:

Set rngTemp = rngCol1.Find("Party Name:", "A1", xlValues, xlPart, xlByRows,
xlNext, False)

Any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Excel Find Method

This works with me:

Sub test()

Dim rngCol As Range
Dim rng As Range

Set rngCol = Columns(1)

Set rng = rngCol.Find(What:="test", _
After:=Cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)

If Not rng Is Nothing Then
MsgBox rng.Address
End If

End Sub

RBS



"JonWayne" wrote in message
. ..
I get the error, "Unable to get the Find property of the Range class",
whenever I use the Find method in Excel VBA. This is my usage:

Set rngTemp = rngCol1.Find("Party Name:", "A1", xlValues, xlPart,
xlByRows,
xlNext, False)

Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Find Method

Are you using Excel 97 and executing this from a commandbutton? If so
change the TakeFocusOnClick property of the commandbutton to False.

--
Regards,
Tom Ogilvy


"JonWayne" wrote in message
. ..
I get the error, "Unable to get the Find property of the Range class",
whenever I use the Find method in Excel VBA. This is my usage:

Set rngTemp = rngCol1.Find("Party Name:", "A1", xlValues, xlPart,

xlByRows,
xlNext, False)

Any ideas?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Find Method

Looking a little closer at your code it should probably be:

Set rngTemp = rngCol1.Find("Party Name:", rngCol1(1), _
xlValues, xlPart, xlByRows,xlNext, False)

--
Regards,
Tom Ogilvy


"JonWayne" wrote in message
. ..
I get the error, "Unable to get the Find property of the Range class",
whenever I use the Find method in Excel VBA. This is my usage:

Set rngTemp = rngCol1.Find("Party Name:", "A1", xlValues, xlPart,

xlByRows,
xlNext, False)

Any ideas?




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
Find Method problem in Excel VBA.... Irmann Excel Worksheet Functions 7 March 10th 08 03:49 AM
How to find method to cut steel coil by using excel. vn Excel Worksheet Functions 1 May 31st 05 03:19 AM
Using Find method in Excel passing more than 1 parameter Nick Excel Programming 3 November 2nd 04 05:56 PM
Find method Kirk Excel Programming 0 September 22nd 04 09:33 PM
find method? CG Rosén Excel Programming 2 November 12th 03 10:30 AM


All times are GMT +1. The time now is 07:20 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"