just curious Xlpart xlWhole

J

John

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
 
D

Dave Peterson

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
 
J

John

Yeah... makes sesne... thanks
John

Dave said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top