Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'Can't find project or library'
"Nick Hodge" wrote in message ... 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nick is part right. After the error, go into the VBE, then go into
Tools=References (you might have to hit the reset button). Your project must be the active project. In the reference listing, there should be at least one reference marked as MISSING. If you are not using this reference, then go back to your source workbook and remove it. then copy it back to this machine and try again. If you are using it, then you need to get a copy of the library installed and registered on this machine. By the way, Right has nothing to do with the cause of the actual error. -- Regards, Tom Ogilvy "Himszy" wrote in message k... 'Can't find project or library' "Nick Hodge" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|