VBA SearchOrder:= ?? (Show all possible values)

drichird

New Member
Joined
Jun 22, 2006
Messages
6
Cells.Replace What:=UserForm1.TextBox1.Text, _
Replacement:=UserForm1.TextBox2.Text, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

If I am typing in the above line as part of a VBA Macro in the IDE, intellisense helps me a lot. As soon as I type in "Cells." it shows me all functions I can call (Replace, Offset, etc...) so I can just choose from one of them.

Is there a similar intellisense help available for what to put after I type in SearchOrder:=" ???
In other words, how could I quickly see what all the xl... constants are that I could put after the SearchOrder:= , it would be nice to see all the possible values (xlByRows, xlByColumns, ...). I am actually looking for something that would show this for any function (show all possible parameter values for any given function parameter)

I tried rightmouse/properties,methods but that is showing way too much stuff.
 

nirvana_

Board Regular
Joined
Mar 25, 2009
Messages
141
Here is how you check all the possible values for SearchOrder.

1) Open Excel
2) Alt + F11. Opens Visual Basic Editor.
3) Press F2. Opens Object Browser.
4) You are looking for replace function. Type Replace in the Search option. Enter.
5) Once the list is populated, Look for "Excel Range Replace" in the list.
6) Right click and click help. Brings the help window.
7) Read the help file it will tell you what constants you can apply for SearchOrder.

In this case you can only apply xlByRows or xlByColumns. Hope this helps.
 

Forum statistics

Threads
1,085,995
Messages
5,387,148
Members
402,045
Latest member
Hidalgo

Some videos you may like

This Week's Hot Topics

Top