View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DennisE DennisE is offline
external usenet poster
 
Posts: 66
Default Trim, Len, Left causing problem

Kris,

I ran into the same problem myself. None of the requisite References were
Missing
and I eventually solved the problem by prefixing the Trim, Len, Left (and for
good measure Right and Mid) functions with the four characters "VBA." E.g., x
= VBA.Left(y,3), etc. To shorten the keystrokes as I develop programs, I
actually code this example as x = Lft(y,3) and then in a code module have:

Function Lft(StringVar As Variant, NCharacters As Long) As String
Lft = VBA.Left(StringVar, NCharacters)
End Function

-- Dennis Eisen