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,081,793
Messages
5,361,316
Members
400,625
Latest member
Asraful Alam

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top