Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
Hey--Is there any way to permanently select certain references from the
VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
Have you thought about using late binding instead of early binding? It's
very easy to implement, but could cause problems if the user has an older version. Just change all your DIM references for the word object to Object. ex. Dim Doc as word.document To Dim do as object HTH Cal " wrote: Hey--Is there any way to permanently select certain references from the VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
Forgot to explain why:-)
When using late binding you don't need to use the reference at all. VB will automatically pick up the most recent associated object based on the createObject(). "CBrine" wrote: Have you thought about using late binding instead of early binding? It's very easy to implement, but could cause problems if the user has an older version. Just change all your DIM references for the word object to Object. ex. Dim Doc as word.document To Dim do as object HTH Cal " wrote: Hey--Is there any way to permanently select certain references from the VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
Why do you think latebinding would have problems with older versions. That
is half the reason to use latebinding. What would cause problems is if you use features not supported in the older version - but that has nothing to do with latebinding. -- Regards, Tom Ogilvy "CBrine" wrote: Forgot to explain why:-) When using late binding you don't need to use the reference at all. VB will automatically pick up the most recent associated object based on the createObject(). "CBrine" wrote: Have you thought about using late binding instead of early binding? It's very easy to implement, but could cause problems if the user has an older version. Just change all your DIM references for the word object to Object. ex. Dim Doc as word.document To Dim do as object HTH Cal " wrote: Hey--Is there any way to permanently select certain references from the VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
That's exactly what I was referring to. Sorry if the explanation wasn't
clear enough. "Tom Ogilvy" wrote: Why do you think latebinding would have problems with older versions. That is half the reason to use latebinding. What would cause problems is if you use features not supported in the older version - but that has nothing to do with latebinding. -- Regards, Tom Ogilvy "CBrine" wrote: Forgot to explain why:-) When using late binding you don't need to use the reference at all. VB will automatically pick up the most recent associated object based on the createObject(). "CBrine" wrote: Have you thought about using late binding instead of early binding? It's very easy to implement, but could cause problems if the user has an older version. Just change all your DIM references for the word object to Object. ex. Dim Doc as word.document To Dim do as object HTH Cal " wrote: Hey--Is there any way to permanently select certain references from the VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
I guess if there would be problems regardless of whether you used late or
early binding, then yes, I guess it wasn't just unclear, but misleading. -- Regards, Tom Ogilvy "CBrine" wrote: That's exactly what I was referring to. Sorry if the explanation wasn't clear enough. "Tom Ogilvy" wrote: Why do you think latebinding would have problems with older versions. That is half the reason to use latebinding. What would cause problems is if you use features not supported in the older version - but that has nothing to do with latebinding. -- Regards, Tom Ogilvy "CBrine" wrote: Forgot to explain why:-) When using late binding you don't need to use the reference at all. VB will automatically pick up the most recent associated object based on the createObject(). "CBrine" wrote: Have you thought about using late binding instead of early binding? It's very easy to implement, but could cause problems if the user has an older version. Just change all your DIM references for the word object to Object. ex. Dim Doc as word.document To Dim do as object HTH Cal " wrote: Hey--Is there any way to permanently select certain references from the VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
I agree that my incomplete explanation could be misleading to someone who has
never used late binding before. The explanation on resolving the problem the OP encountered is still valid. I will ensure that the next post I make within this board is more complete, so there is no confusion on the OP's part. Once you pointed out the weakness in my explanation on the first post, what exactly was the second one for? Just for the general, I'm right, you are wrong? Is that the normal behaviour and attitude of MVP's? I'm here on a volunteer basis just as you are trying to help people. "Tom Ogilvy" wrote: I guess if there would be problems regardless of whether you used late or early binding, then yes, I guess it wasn't just unclear, but misleading. -- Regards, Tom Ogilvy "CBrine" wrote: That's exactly what I was referring to. Sorry if the explanation wasn't clear enough. "Tom Ogilvy" wrote: Why do you think latebinding would have problems with older versions. That is half the reason to use latebinding. What would cause problems is if you use features not supported in the older version - but that has nothing to do with latebinding. -- Regards, Tom Ogilvy "CBrine" wrote: Forgot to explain why:-) When using late binding you don't need to use the reference at all. VB will automatically pick up the most recent associated object based on the createObject(). "CBrine" wrote: Have you thought about using late binding instead of early binding? It's very easy to implement, but could cause problems if the user has an older version. Just change all your DIM references for the word object to Object. ex. Dim Doc as word.document To Dim do as object HTH Cal " wrote: Hey--Is there any way to permanently select certain references from the VB Project library? I want to be able to always reference microsoft word at all times in VB, rather than have my users tell the VB editor that they would like to reference word... Thanks, Abe |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
permanent/programmatic changes to VBA Project References
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Missing VBA Project References for non-VBA commands | Excel Discussion (Misc queries) | |||
VB Project References | Excel Discussion (Misc queries) | |||
programmatic access to visual basic project is not trusted | Excel Programming | |||
Programmatic Access to Visual Basic Project is not Trusted | Excel Programming | |||
'Programmatic access to Visual Basic project is not trusted.' message | Excel Programming |