Dim num as Long
num = Right(Environ("UserName"), 1)
Or to make it more robust
Dim num as Variant
num = Right(Environ("UserName"), 1)
if isnumeric(num) then
num = clng(num)
end if
--
Regards,
Tom Ogilvy
"WLMPilot" <(E-Mail Removed)> wrote in message
news:7A5DB685-6FE3-460F-BD59-(E-Mail Removed)...
>I am using "Right(Environ("UserName"), 1)" to pull the last character in
>the
> username. This character happens to be a number. Since it is a string, I
> need to know have to convert to a numeric in order to use in a formula.
>
> Thanks
|