Conflict in Reference Function

  • Follow


Anyone?

I have a reference set to MS VBA, MS Access 11 object libary, MS DAO Object 
Library, MS ActiveX data object, MS Excel 11 object library, and MS Scripting 
Runtime.

At this point everything is working fine.  We use "Reflection" to access our 
cost system.  I would like to add this library "Reflection for ReGIS 
Graphics" or "Reflection for Regis Graphics ActiveX Control 1.0 Type Library" 
but when I do I get a conflict with one of my modules' "Left()" function.

VBA syntax uses left([string],[number char]) but the Reflection "Left" 
function is different it is looking for "object.Left = value" type of syntax.

How do I resolve this "Function Conflict"?
-- 
Thanks in advance!
**John**
0
Reply Utf 4/29/2010 1:23:01 PM

Hi,
you can use VBA.Left to explicitly call VBA function and Reflection.Left to 
call other one, where Reflection is exact name of your library

You can also put VBA higher then Reflection in References list, then Left() 
will be VBA function

-- 
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"John" <John@discussions.microsoft.com> wrote in message 
news:FD7A4D23-0C15-4A96-BA31-D0E2F6A77F74@microsoft.com...
> Anyone?
>
> I have a reference set to MS VBA, MS Access 11 object libary, MS DAO 
> Object
> Library, MS ActiveX data object, MS Excel 11 object library, and MS 
> Scripting
> Runtime.
>
> At this point everything is working fine.  We use "Reflection" to access 
> our
> cost system.  I would like to add this library "Reflection for ReGIS
> Graphics" or "Reflection for Regis Graphics ActiveX Control 1.0 Type 
> Library"
> but when I do I get a conflict with one of my modules' "Left()" function.
>
> VBA syntax uses left([string],[number char]) but the Reflection "Left"
> function is different it is looking for "object.Left = value" type of 
> syntax.
>
> How do I resolve this "Function Conflict"?
> -- 
> Thanks in advance!
> **John** 

0
Reply Alex 4/29/2010 2:50:35 PM


Thanks Alex... That cleared it up.
-- 
Thanks in advance!
**John**


"Alex Dybenko" wrote:

> Hi,
> you can use VBA.Left to explicitly call VBA function and Reflection.Left to 
> call other one, where Reflection is exact name of your library
> 
> You can also put VBA higher then Reflection in References list, then Left() 
> will be VBA function
> 
> -- 
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://accessblog.net
> http://www.PointLtd.com
> 
> 
> "John" <John@discussions.microsoft.com> wrote in message 
> news:FD7A4D23-0C15-4A96-BA31-D0E2F6A77F74@microsoft.com...
> > Anyone?
> >
> > I have a reference set to MS VBA, MS Access 11 object libary, MS DAO 
> > Object
> > Library, MS ActiveX data object, MS Excel 11 object library, and MS 
> > Scripting
> > Runtime.
> >
> > At this point everything is working fine.  We use "Reflection" to access 
> > our
> > cost system.  I would like to add this library "Reflection for ReGIS
> > Graphics" or "Reflection for Regis Graphics ActiveX Control 1.0 Type 
> > Library"
> > but when I do I get a conflict with one of my modules' "Left()" function.
> >
> > VBA syntax uses left([string],[number char]) but the Reflection "Left"
> > function is different it is looking for "object.Left = value" type of 
> > syntax.
> >
> > How do I resolve this "Function Conflict"?
> > -- 
> > Thanks in advance!
> > **John** 
> 
> .
> 
0
Reply Utf 4/29/2010 8:58:01 PM

=?Utf-8?B?Sm9obg==?= <John@discussions.microsoft.com> wrote in
news:FD7A4D23-0C15-4A96-BA31-D0E2F6A77F74@microsoft.com: 

> I have a reference set to MS VBA, MS Access 11 object libary, MS
> DAO Object Library, MS ActiveX data object, MS Excel 11 object
> library, and MS Scripting Runtime.
> 
> At this point everything is working fine.  We use "Reflection" to
> access our cost system.  I would like to add this library
> "Reflection for ReGIS Graphics" or "Reflection for Regis Graphics
> ActiveX Control 1.0 Type Library" but when I do I get a conflict
> with one of my modules' "Left()" function. 
> 
> VBA syntax uses left([string],[number char]) but the Reflection
> "Left" function is different it is looking for "object.Left =
> value" type of syntax. 
> 
> How do I resolve this "Function Conflict"?

By specifying the parent library, as Alex has explained.

But I'd say you shouldn't add any references at all beyond the first
3 you list, and do all the rest with late binding. Then you wouldn't
have this problem at all. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
Reply David 4/29/2010 11:36:26 PM

3 Replies
346 Views

(page loaded in 0.079 seconds)

Similiar Articles:













8/1/2012 3:35:36 PM


Reply: