Thread: 'Right'
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default 'Right'

Himszy

VBA's Right Function has not changed at all. I suspect that the coercion to
the type of the myVal variable may be the problem.

It would help if you gave us the error.

If it is a matter of coercion then perhaps try

CDbl(), CSng(), CInt(), etc

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS

"Himszy" wrote in message
k...
Hi,

I have the following code and it seems to work on excel 97. On excel 2000
it
doesn't work, it gets 'stuck' at 'right'. Is there a different form of
code
that will work for both?

MyVal = Right(Result1, 3)

Thanks Michael