I would like to get the return value for an evaluate statement which is a variant data type, convert it to an integer and do some computation. I have 4 test programs, the first 3 all work, the 4ths does not.
The first sd_test(returns 1) and st_test1(returns 1) demonstrate that my evaluate statement is correct and works,
sd_test2(returns 3) shows that I can convert a variant to an integer
in sd_test3(returns #VALUE!) I try to put both together and it doesn't work?
any help? thanks paul
Function sd_test()
Dim X As Variant
X = Evaluate("=row(myTable[#Headers])")
sd_test = X
End Function
Function sd_test1() As Variant
Dim X As Variant
X = Evaluate("=row(myTable[#Headers])")
sd_test1 = X
End Function
Function sd_test2() As Integer
Dim X As Variant
Dim Y As Integer
X = 3
Y = CInt(X)
sd_test2 = Y
End Function
Function sd_test3() As Integer
Dim X As Variant
Dim Y As Integer
X = Evaluate("=row(myTable[#Headers])")
Y = CInt(X)
sd_test3 = Y
End Function
Bookmarks