LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Object syntax with a Period ( . )

I took the code below from the VBA help example for the
Find Next method, and am in process of learning more
about it and building a general find proc that can be called.

In this line,
Set InfoCell = .Find(IFindThis, LookIn:=xlFormulas)

I remember reading somewhere about the period(.) being
placed before the word Find. Not that I'm looking for that
documentation, I can't find it. (no pun intended)

Can someone point me to the right section and/or give me
a brief explanation of the .Find syntax?
thanks,
Neal Z


Sub zzz_Find_Method(IFindThis)
'This example finds all cells in the range A1:A25 that _
contain the value in the IFindThis var.
Dim InfoCell As Object
Dim FirstAddress

'With Worksheets("2222-0900").Range("a1:a25")
With Worksheets("2222-0900").Range(Cells(1, 1), Cells(25, 1))
Set InfoCell = .Find(IFindThis, LookIn:=xlFormulas)
If Not InfoCell Is Nothing Then
FirstAddress = InfoCell.Address
MsgBox "FirstAddress= " & FirstAddress & Cr _
& "InfoCell.Row= " & InfoCell.Row & " InfoCell.Column= " &
InfoCell.Column
Do
Set InfoCell = .FindNext(InfoCell)
If Not InfoCell Is Nothing And InfoCell.Address < FirstAddress _
Then MsgBox InfoCell.Address
Loop Until Not InfoCell Is Nothing And InfoCell.Address = FirstAddress
Else
MsgBox IFindThis & " is NOT found."
End If
End With

End Sub
--
Neal Z
 
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
vba syntax for excel object TKoel Excel Discussion (Misc queries) 1 February 10th 09 11:34 PM
Syntax in Varying Object Names Marty Excel Programming 1 December 15th 05 06:58 PM
Formula syntax, "Object-defined error" [email protected] Excel Programming 2 December 29th 04 04:45 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM
Proper syntax to Set a Workbook Object? Rick Stanford Excel Programming 2 September 13th 03 07:15 PM


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