left function 
Author Message
 left function

hi

when i try to use the left function i always get the error 451

? left("abc",  1)    ' prints nothing
? err.Description
Object not a collection

Could anyone help me?

tia

Lena



Sat, 24 Jan 2004 16:05:15 GMT  
 left function
Lena,

from the help file: "This function can be used in a module, but returns an
error if it is used on a form."

You using it from a form perchance? ;-)

Dino


Quote:
> hi

> when i try to use the left function i always get the error 451

> ? left("abc",  1)    ' prints nothing
> ? err.Description
> Object not a collection

> Could anyone help me?

> tia

> Lena



Sat, 24 Jan 2004 17:21:50 GMT  
 left function
Hi,

According to the help file,  this function should be used in a module and
not in a form.
I tried it on the form...same error as you.  It worked fine in the module.

cheers
Nishen


Quote:
> hi

> when i try to use the left function i always get the error 451

> ? left("abc",  1)    ' prints nothing
> ? err.Description
> Object not a collection

> Could anyone help me?

> tia

> Lena



Sat, 24 Jan 2004 17:35:26 GMT  
 left function
Seeing that it's inoperative in a Form, the best bet is to use a Mid()
instead.

Jeff Law
DataMasta Limited
http://www.datamasta.co.nz


Quote:
> hi

> when i try to use the left function i always get the error 451

> ? left("abc",  1)    ' prints nothing
> ? err.Description
> Object not a collection

> Could anyone help me?

> tia

> Lena



Sun, 25 Jan 2004 03:40:21 GMT  
 left function
I have found that Left doesn't work in eVB.  You have to use Mid.  Right
does work however (?????)


Quote:
> Seeing that it's inoperative in a Form, the best bet is to use a Mid()
> instead.

> Jeff Law
> DataMasta Limited
> http://www.datamasta.co.nz



> > hi

> > when i try to use the left function i always get the error 451

> > ? left("abc",  1)    ' prints nothing
> > ? err.Description
> > Object not a collection

> > Could anyone help me?

> > tia

> > Lena



Sun, 25 Jan 2004 09:26:52 GMT  
 left function
This was answered on here before.  eVB interprets the Left function as the
Left property when used in a form.  There is no Form.right so that function
is ok.


Quote:
> I have found that Left doesn't work in eVB.  You have to use Mid.  Right
> does work however (?????)



> > Seeing that it's inoperative in a Form, the best bet is to use a Mid()
> > instead.

> > Jeff Law
> > DataMasta Limited
> > http://www.datamasta.co.nz



> > > hi

> > > when i try to use the left function i always get the error 451

> > > ? left("abc",  1)    ' prints nothing
> > > ? err.Description
> > > Object not a collection

> > > Could anyone help me?

> > > tia

> > > Lena



Wed, 28 Jan 2004 02:00:28 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Left$ and Left functions

2. Problems with Right and Left functions - Functions MISSING!!!

3. left function

4. Help: right/left functions.

5. Left function doesn't work

6. Can't use format, trim, left functions in Excel 97 VBA

7. Windows Forms and the old Left Function

8. RIGHT() and LEFT() functions

9. Left Function Reference ?

10. Syntax for Left function?

11. Left Function

12. Left Function Missing

 

 
Powered by phpBB® Forum Software