PDA

View Full Version : Solved: Can't use Right function???



malik641
06-09-2006, 04:56 AM
My code use to work, but now I get a compile error with the Right function. For some reason is says "Cannot Find project or Library".

Here's my line of code:


SentType = Right(ActiveSheet.Shapes(Application.Caller).TextFrame.Characters.Text, 1)

But this even happens even if I try this:


Debug.Print Right("Hey" , 1)


What gives?

malik641
06-09-2006, 04:59 AM
Nevermind. I just figured it out.

I have another module with a procedure that uses early binding to Outlook...and the reference was turned on as "Missing Outlook 11.0 Object Library". When I turned this off, the Right function works.

That was strange, huh?

mdmackillop
06-09-2006, 09:11 AM
Hi Joseph,
I came across this a wee while ago, but with Format. The lesson must be to check references of downloaded workbooks!
Regards
Malcolm

malik641
06-09-2006, 10:06 AM
I would say so.

Maybe I should just start using late binding....or at least convert it at the end of writing the procedure. :think: