ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   just curious Xlpart xlWhole (https://www.excelbanter.com/excel-programming/431593-just-curious-xlpart-xlwhole.html)

John[_19_]

just curious Xlpart xlWhole
 
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

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

John[_19_]

just curious Xlpart xlWhole
 
Yeah... makes sesne... thanks
John

Dave Peterson wrote:
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




All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com