I use VBA all the time but have never tried to use Type. I haven't quite figured it out. Not sure how to pass the parameter into a function. Basically i have a function that i want to call to find a value in a range based on a condition. The condition is a type and based on the type i will find the value where the condition is met. maybe there is a better way to do it? I haven't been able to find anything similar to what I'm doing. Maybe i over looked a thread.
Code:
Type ForEachCType
OffsetR As Integer
OffsetC As Integer
EqualTo As Boolean
GreaterThan As Boolean
GTorEqualto As Boolean
LessThan As Boolean
LTorEqualto As Boolean
End Type
Sub test()
a = ConditionalFind("Jon", Range("BJ:BW"), ForEachCType.OffsetR, "G")
End Sub
'ForEachCType.OffsetR this is where i don't know how to call or assign this parameter a value
Function ConditionalFind(SearchValue, SearchRange As Range, ForEachConditionType As ForEachCType, ForEachConditionValue)
'code stuffs yay
End Function
Last edited: