Your syntax on the InStr function is incomplete... as constructed, your
statement is looking for this...
"C:\", Range(strC & r).Formula
inside the string value of 1 (
VB converts your number to a string). Why,
because you only specified two arguments to the InStr function. The first
argument is optional... it is the starting point for the search and defaults
to 1 when not specified. If you specify the starting position as a number,
then it must be followed by two string argument... the string to search
followed by the string being looked for. I can't give you a corrected
statement for you to look at because you didn't tell us what string you were
looking for inside of that path string.
--
Rick (MVP - Excel)
"Shell" wrote in message
...
I am trying to use the following
If InStr(1, "C:\", Range(strC & r).Formula) 0 Then
Print #1, r & strC & " " & " " & Range(strC & r).Formula
End If
strC = D
r = 21
Range(strC & r).Formula = "=(ISERROR(GET
PIVOTDATA("EQPSERIAL",'C:\Reports..........."
The print statement never happens.
Can anyone tell me what is wrong?
Thanks
--
Shell