OR
if cstr(a)=cstr(b) then
' say yes
else
' say no
end if
Of course, you could just do this to being with:
a = 1
b = 1
Why do you cast one as a string and the other as a number?
--
- a
Dim a
Dim b
a = "1"
b = 1
if (a = b)
.......
How can I make it legal?
If val(a)=b then
or
if a=str(b) then
or if a or be can be either
if str(a)=str(b)
Also, probably best to trim just in case so
if trim(str(a)) = trim(str(b))
or
if val(a) =val(b)
Carfield Yim <c813...@comp.polyu.edu.hk> wrote in message
news:3836E65F...@comp.polyu.edu.hk...