Match method new?

  • Thread starter Thread starter davegb
  • Start date Start date
D

davegb

I ran across the Match method doing research here on writing some
macros I'm working on (have already made several posts on these). I ran
across the "Match" method in some of the posts, and went into both the
Object Browser and the VBA help and looked for "Match". No reply to
either, like it doesn't exist. I'm using XL 2000 and wondering if this
method is newer than that. If not, why is it not listed in either the
Object Browser or VBA help?
TIA
 
I just did an additional check. I searched both in the Object Browser
and VBA help for the "Cells" method, which I know exists in XL2000. No
results. So now I am assuming that there is no definition or help for
Methods in either. Is this correct? Fortunately, I have an Excel
programming manual on order, which I assume will have info not just on
Objects, but also methods. If not, it will go back!
 
No it is not a method, it is a worksheetfunction that can be used from VBA.
If you look for WorksheetFunction in the object browser, then you will see
Match in the Members list.

Also, Cells is not a method, but an Application, Range or Worksheet
property. If you look at any of these objects in the browser, you will see
Cells in the Members list.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks, Bob. Don't know the difference between a worksheet function and
a method. And am still amazed that you have to go find them, and that
VBA helps doesn't recognize them at all. Are all worksheetfunctions not
listed in VBA help. If so, where would one get information on them? If
fact, how would you know that these are worksheeetfunctions and not
methods? Somewhere else I saw Cells referred to as a Method, because I
thought it was an object! I'm finding object oriented/VBA definitions
very confusing at this point! And I've done some reading on the various
websites mentioned in this forum trying to understand more about the
basics. I've got a long way to go, obviously...
 
Worksheetfunctions are listed in help, look up 'List of Worksheet Functions
Available to Visual Basic'.

There are some VBA functions such as LEFT that replicate worksheetfunctions.
You just have to get experience it all and get an understanding.

Methods do, properties are, so Cells wouldn't be a method.

If you want to get really confused, think about Range. Range can be an
object or a property, and the range property returns a range object. Got
that :-)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks for getting me really confused! :)
Seriously, thanks for the explanation. It still seems strange to me
that I can't just type in a Method, Function or Object and not get any
hit at all in VBA help. Having to know where to go to find it is just
the opposite of what I would have hoped for. My guess is you didn't
write the Help, so it's probably not your fault! Just venting here and
wondering if there's better places to look to find out definitions and
properties and functions. I'm waiting for a VBA Programming book to get
here, hopefully it will list all these things in the index.
Thanks again.
 
Try using the object browser from VBA (press F2). Then when you look for
MATCH, you will see that Match is a member of the Worksheetfunction class of
the Excel library. More terms to confuse, befuddle, and ensure job
security..... ;-)

HTH,
Bernie
MS Excel MVP
 
Bernie,
Thanks for the reply. Now I'm more frustrated than ever! I finally
found "Match", with the help of you and others, and there's absolutely
no information about it there! Just the word in a list! So what does
the Object Browser do? It looks to me like a heirarchal dictionary
without definitions!
Job security? This is making me feel like quitting and going to live up
in the mountains where there are no computers or spreadsheets at all.
Seriously, where does one go to find information, like definitions and
syntax for all that "stuff" listed in the Object Browser? What helps me
the most, when I'm trying to figure out how to write code, is to see
examples of the specific object/method/function as it is used. I've
already done some coding with VBA simply by doing searches in these
forums and copying and modifying the code that some of you have offered
to help others. But it would be nice to be able to look up things and
find out how they are applied.
All this talk, and I still have no idea what the Match function does!
Thanks again for your help and your patience! Someday, I might even
start to get some of this, if I live long enough.
 
Dave,

Match is a worksheet function, so if you want to find out what it does, look
it up from within Excel, not from within the VBE. The object browser just
tells you that Match is one of the worksheetfunctions that can be invoked in
VBA.

As it happens, if you select Match in the Members List, and hit the ? in the
Object Browser toolbar, it takes you to help on Using Microsoft Excel
Worksheet Functions in Visual Basic, which just happens to use Match as an
example.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks, Bob! I appreciate your help. At least that screen is a little
better than no help at all. Will keep working at it. I consider myself
fortunate to have the help I get in this and other forums. Otherwise,
I'd be toast!
 
Back
Top