here is a sample code:
for "sales" and 2009, what strf reads is:
when i evaluate this string, i get "1" in the msgbox.
the exat same string returns 80 when i put it in a cell.
if i use Vlookup in a similar way, evaluate gives type mismatch error.
Any ideas ?
Code:
Public Function getest(esttype, yr)
Dim strf As String
strf = "=counta('m:\folder\mds\[rating index.xls]" & esttype & Right(yr, 2) & "'!$1:$1)"
MsgBox Evaluate(strf)
End Function
for "sales" and 2009, what strf reads is:
Code:
=counta('m:\folder\mds\[rating index.xls]sales09'!$1:$1)
when i evaluate this string, i get "1" in the msgbox.
the exat same string returns 80 when i put it in a cell.
if i use Vlookup in a similar way, evaluate gives type mismatch error.
Any ideas ?