Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Turn on reference within a macro

Hello,

I was wondering if it was possible to run a macro that would turn on a
reference? Specifically, the Adobe Distiller reference (VBa editor -
Tools - References). I would like for my spreadsheet template to
have it turned off by default, but if a user wants to run a macro that
calls the distiller then the reference would turn on.


Is this possible?

Thanks in advance for any responses.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Turn on reference within a macro

On May 16, 12:14*pm, wrote:
Hello,

I was wondering if it was possible to run a macro that would turn on a
reference? *Specifically, the Adobe Distiller reference (VBa editor -
Tools - References). *I would like for my spreadsheet template to
have it turned off by default, but if a user wants to run a macro that
calls the distiller then the reference would turn on.

Is this possible?

Thanks in advance for any responses.


Give something like this a shot, changing the Item to whatever your
reference is.

Sub Remove_Reference()
Dim x As Object
Set x = Application.VBE.ActiveVBProject _
.References.Item("R8ole32.tlb")
Application.VBE.ActiveVBProject.References.Remove x
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Turn on reference within a macro

On May 16, 12:26 pm, JW wrote:
On May 16, 12:14 pm, wrote:

Hello,


I was wondering if it was possible to run a macro that would turn on a
reference? Specifically, the Adobe Distiller reference (VBa editor -
Tools - References). I would like for my spreadsheet template to
have it turned off by default, but if a user wants to run a macro that
calls the distiller then the reference would turn on.


Is this possible?


Thanks in advance for any responses.


Give something like this a shot, changing the Item to whatever your
reference is.

Sub Remove_Reference()
Dim x As Object
Set x = Application.VBE.ActiveVBProject _
.References.Item("R8ole32.tlb")
Application.VBE.ActiveVBProject.References.Remove x
End Sub


Thanks JW, that does seem to work to remove the reference. What would
I need to turn a reference on?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Turn on reference within a macro

On May 16, 1:23 pm, wrote:
On May 16, 12:26 pm, JW wrote:



On May 16, 12:14 pm, wrote:


Hello,


I was wondering if it was possible to run a macro that would turn on a
reference? Specifically, the Adobe Distiller reference (VBa editor -
Tools - References). I would like for my spreadsheet template to
have it turned off by default, but if a user wants to run a macro that
calls the distiller then the reference would turn on.


Is this possible?


Thanks in advance for any responses.


Give something like this a shot, changing the Item to whatever your
reference is.


Sub Remove_Reference()
Dim x As Object
Set x = Application.VBE.ActiveVBProject _
.References.Item("R8ole32.tlb")
Application.VBE.ActiveVBProject.References.Remove x
End Sub


Thanks JW, that does seem to work to remove the reference. What would
I need to turn a reference on?


Maybe something like this:

Sub Add_reference()
Application.VBE.ActiveVBProject.References.AddFrom File ("C:
\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe")
End Sub

Seems to work. Kind of simple though, not sure if I am over looking
anything. Thanks for pointing me in the direction of
Application.VBE.ActiveVBProject.References . Much appreciated.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Turn on reference within a macro

On May 16, 1:31*pm, wrote:
On May 16, 1:23 pm, wrote:





On May 16, 12:26 pm, JW wrote:


On May 16, 12:14 pm, wrote:


Hello,


I was wondering if it was possible to run a macro that would turn on a
reference? *Specifically, the Adobe Distiller reference (VBa editor -
Tools - References). *I would like for my spreadsheet template to
have it turned off by default, but if a user wants to run a macro that
calls the distiller then the reference would turn on.


Is this possible?


Thanks in advance for any responses.


Give something like this a shot, changing the Item to whatever your
reference is.


Sub Remove_Reference()
* * Dim x As Object
* * Set x = Application.VBE.ActiveVBProject _
* * * * .References.Item("R8ole32.tlb")
* * Application.VBE.ActiveVBProject.References.Remove x
End Sub


Thanks JW, that does seem to work to remove the reference. *What would
I need to turn a reference on?


Maybe something like this:

Sub Add_reference()
* * Application.VBE.ActiveVBProject.References.AddFrom File ("C:
\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe")
End Sub

Seems to work. *Kind of simple though, not sure if I am over looking
anything. *Thanks for pointing me in the direction of
Application.VBE.ActiveVBProject.References . *Much appreciated.- Hide quoted text -

- Show quoted text -


Yup, that would be the way I would handle it.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Turn on reference within a macro

On May 16, 2:18 pm, JW wrote:
On May 16, 1:31 pm, wrote:



On May 16, 1:23 pm, wrote:


On May 16, 12:26 pm, JW wrote:


On May 16, 12:14 pm, wrote:


Hello,


I was wondering if it was possible to run a macro that would turn on a
reference? Specifically, the Adobe Distiller reference (VBa editor -
Tools - References). I would like for my spreadsheet template to
have it turned off by default, but if a user wants to run a macro that
calls the distiller then the reference would turn on.


Is this possible?


Thanks in advance for any responses.


Give something like this a shot, changing the Item to whatever your
reference is.


Sub Remove_Reference()
Dim x As Object
Set x = Application.VBE.ActiveVBProject _
.References.Item("R8ole32.tlb")
Application.VBE.ActiveVBProject.References.Remove x
End Sub


Thanks JW, that does seem to work to remove the reference. What would
I need to turn a reference on?


Maybe something like this:


Sub Add_reference()
Application.VBE.ActiveVBProject.References.AddFrom File ("C:
\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe")
End Sub


Seems to work. Kind of simple though, not sure if I am over looking
anything. Thanks for pointing me in the direction of
Application.VBE.ActiveVBProject.References . Much appreciated.- Hide quoted text -


- Show quoted text -


Yup, that would be the way I would handle it.


Thanks again, I really appreciate your posts and feedback.
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
So close... now how to turn TEXT to a Cell Reference JulieMK Excel Programming 2 April 11th 08 12:52 AM
Turn Off Circular Reference Message ryguy7272 Excel Programming 2 December 18th 07 04:09 PM
Turn off R1C1 reference style via VBA Mike Milligan Excel Programming 1 October 23rd 06 07:57 PM
How do I turn on relative reference(?) in a macro (97ver had butto Bernina27 Excel Programming 1 January 10th 06 11:26 PM
How do I turn around 'Circulation Reference' msgbox? Zoo Excel Programming 6 November 15th 05 05:28 PM


All times are GMT +1. The time now is 02:38 PM.

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"