View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] mikegioia@gmail.com is offline
external usenet poster
 
Posts: 1
Default problem with excel invalid procedure call

Hi,

Here is the following snippet of code that is giving me a problem:

If Sheet2.Cells(i, 3).Value = group Then
If InStr(0, output, Sheet2.Cells(i, 4)) = 0 Then
output = output & Sheet2.Cells(i, 4) & ": " &
Sheet2.Cells(i, 11) & "lbs" & vbNewLine
End If
End If


The error likes in the "If InStr..." line. On the SECOND time it
iterates and hits this, I am getting an Invalid Procedure Call or
Argument error. Ive tried using the textual comparison 4th argument and
still no luck. Is the syntax of the InStr() function off here? Any help
would be greatly appreciated.

by the way, 'output', 'group' are both strings.


Mike