Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default permanent/programmatic changes to VBA Project References

Merely clarifying that the two are unrelated which you still left as
ambiguous. Perhaps it could be stated differently.

If you want to discuss it, my email isn't hidden.

--
Regards,
Tom Ogilvy







"CBrine" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing VBA Project References for non-VBA commands Rock Chalk Julie Excel Discussion (Misc queries) 1 January 12th 07 06:11 PM
VB Project References Tom Chau Excel Discussion (Misc queries) 0 July 18th 06 05:17 AM
programmatic access to visual basic project is not trusted Rob Kings Excel Programming 4 June 23rd 06 12:10 PM
Programmatic Access to Visual Basic Project is not Trusted Anson[_2_] Excel Programming 2 July 20th 04 02:12 PM
'Programmatic access to Visual Basic project is not trusted.' message Joe Excel Programming 1 February 13th 04 03:19 PM


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"