View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default just curious Xlpart xlWhole

If you do a manual Find, you'll see (under the options button) an option to
"Match entire cell contents".

The xlwhole is the same as checking this box. xlpart is like leaving it
unchecked.

VBA has a bunch of constants that are used instead of their numeric value (you
can't change these--they're built into the language).

If you use the constants, it makes the code much more readable/maintainable.

..cells.find(what:="something",lookat:=2, ...
is much more obtuse (for me anyway) than
..cells.find(what:="something",lookat:=xlPart, ...


If you know what this does:
application.dialogs(64)
Then you've got a pretty good memory!

But I bet you can figure out what this means pretty easily:
Application.Dialogs(xlDialogFormulaFind).Show


John wrote:

In .find the xlPart has a value of 2, xlWhole is 1. What do those mean?
Anything? What if you start with a const xlPart=3 or something?

John


--

Dave Peterson