Tanya
If I understand you correctly you want the data
type for a Sub or function ??
The something along these lines may help,
In a module;
Type fruit
orange As Integer
banana As Integer
pears As Integer
apples As Integer
End Type
Sub Test()
Dim Fr As fruit
Fr.apples = 12
Fr.pears = 1
MsgBox Fr.apples & ":" & Fr.pears
End Sub
HTH
Ivan
Thanks Ivan.
For example, I want to be able to look for cells in a worksheet that contain a value of type Fruit. If a cell is of that type then I want to perform an operation on that cell.
At the moment I'm using a function which looks for text strings that look like "Apple", "Orange"
etc. but it takes a long time because I have to look for each individual match.