PDA

View Full Version : Solved: Variant List



YellowLabPro
10-09-2007, 08:12 AM
Never mind- That is what the Help file is for.....
Should have been
valList = array("SNBD", "SNBB", "SNBT", "SNBJ", "SNBP", "SNBGG", "SNBH", "SNBGL", "SNBPK", "SHOES", "HAT", "BEAN", "TEE")

I need some help w/ this line, declaring my list. I want to keep it separate for maintenance from the line of code.

This line is erroring, due to syntax.
valList = "SNBD", "SNBB", "SNBT", "SNBJ", "SNBP", "SNBGG", "SNBH", "SNBGL", "SNBPK", "SHOES", "HAT", "BEAN", "TEE"



Dim c As Range, rng As Range
Dim lrow As Long
Dim valList As Variant
valList = "SNBD", "SNBB", "SNBT", "SNBJ", "SNBP", "SNBGG", "SNBH", "SNBGL", "SNBPK", "SHOES", "HAT", "BEAN", "TEE"
lrow = Cells(Rows.Count, 9).End(xlUp).Row
Set rng = Range("J6:J" & lrow)
For Each c In rng
If Not IsError(Application.Match(c.Value, Array(valList), 0)) _
And Len(c.Offset(0, 45).Value & c.Offset(0, 46).Value & c.Offset(0, 47).Value) < 1 Then

Oorang
10-09-2007, 01:17 PM
/me takes post out of unanswered queue.

YellowLabPro
10-09-2007, 01:20 PM
Sorry Aaron what do you mean?

Oorang
10-09-2007, 01:24 PM
rofl Well as long as a post does not have a response to it, it stays in the "Unanswered queue". (Click search, then unanswered.) By putting a post in the thread, the next time the server indexes that search, this thread will no longer come up when people select "Unanswered Threads".

YellowLabPro
10-09-2007, 01:47 PM
I know... I was testing you .....
j/k... had no clue:o:

Paul_Hossler
10-11-2007, 06:05 AM
Not tested -- Maybe try ...

valList = Array ("SNBD", "SNBB", "SNBT", "SNBJ", "SNBP", "SNBGG", "SNBH", "SNBGL", "SNBPK", "SHOES", "HAT", "BEAN", "TEE")

and then use LBound(varList) and UBound(varList) and change "Array(valList)," to something like varList(i)

Paul