-
Solved: Evaluate("INDEX vs Application.Index
Hello
I am trying to transform this line:
[vba]
For Each dPart In Evaluate("INDEX(" & Me.ComboBox1.Value & ", , 1)")
[/vba]
to replace Evaluate("INDEX(" with Application.WorksheetFunction.Index( Me.Combobox1, ,1) 'not working
can someone help me to put this in a correct way
thank you
-
You need:
[vba]Application.WorksheetFunction.Index(Sheets("some sheet").Range(Me.Combobox1), 0,1) [/vba]
-
but combobox1 has a collection of dynamic name of ranges (rang1, rang2, etc). so normally you do not need to add the Sheets"name".range etc ... or I am wrong?
-
It depends where your code is located. You may be able to simply use:
[vba]Application.WorksheetFunction.Index(Application.Range(Me.Combobox1), 0,1) [/vba]
-
yes, you are correct!It is working thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules