K
kirkm
Hello Experts
This is from help - modified slightly -
Function Test(theField, Range)
Dim c, firstAddress
With Worksheets("Sheet1").Range(Range)
Set c = .Find(theField, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Debug.Print c.Value, c.Address
Stop
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Function
It kind of does what I'm attempting..... BUT what exactly is c ?
Printing c. in the debug window shows no dropdown choices. However you
can get results for ? c.value or ? c.Address.
At that point a print c(4) or c (5) or even c(500) shows seemingly
random results Print Ubound(c) sees an error.
How do you get the value of other fields at c.Address? In the way
Print c.value gives the right value for theField field.
Thanks - Kirk
This is from help - modified slightly -
Function Test(theField, Range)
Dim c, firstAddress
With Worksheets("Sheet1").Range(Range)
Set c = .Find(theField, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Debug.Print c.Value, c.Address
Stop
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Function
It kind of does what I'm attempting..... BUT what exactly is c ?
Printing c. in the debug window shows no dropdown choices. However you
can get results for ? c.value or ? c.Address.
At that point a print c(4) or c (5) or even c(500) shows seemingly
random results Print Ubound(c) sees an error.
How do you get the value of other fields at c.Address? In the way
Print c.value gives the right value for theField field.
Thanks - Kirk