Conflict in Reference Function

J

John

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"?
 
A

Alex Dybenko

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
 
J

John

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


Alex Dybenko said:
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 said:
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"?

.
 
D

David W. Fenton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top