Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Line of Code to set references


Suppose I wish to set reference to "Micosoft Visual Basic fo
Extensibility5.0". How do I accomplish this programmatically?

TIA

Myle

--
Myle
-----------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...fo&userid=2874
View this thread: http://www.excelforum.com/showthread.php?threadid=52906

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Line of Code to set references

http://support.microsoft.com/kb/160647/en-us
XL97: How to Programmatically Create a Reference

set a reference manually and then query it for the file

? thisworkbook.VBProject.References("vbide").FULLPAT H
C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\VBA\VBEEXT1.OLB

FOR EXAMPLE

or try the GUID

? thisworkbook.VBProject.References("vbide").Guid
{0002E157-0000-0000-C000-000000000046}
possibly.

This was from Excel 97, so try it in your version.

--
regards,
Tom Ogilvy



"Myles" wrote in
message ...

Suppose I wish to set reference to "Micosoft Visual Basic for
Extensibility5.0". How do I accomplish this programmatically?

TIA

Myles


--
Myles
------------------------------------------------------------------------
Myles's Profile:

http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=529064



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Line of Code to set references


Thanks Tom for the lead. It does help in setting reference to a WorkBook
and from what I gleaned from the link, I tried the following line for
settting the reference to "Microsoft Visual Basic for Applications
Extensibility 5.3" and came up with "Method VBE of object_Application
failed" error.

Set x = Application.VBE.ActiveVBProject _
..References("Microsoft Visual Basic for Applications
Extensibility 5.3")

Myles.


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=529064

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Line of Code to set references

You need to use the name of the Extensibility project

Set x = Application.VBE.ActiveVBProject.References("VBIDE" )


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Myles"
wrote in message
...

Thanks Tom for the lead. It does help in setting reference to a
WorkBook
and from what I gleaned from the link, I tried the following
line for
settting the reference to "Microsoft Visual Basic for
Applications
Extensibility 5.3" and came up with "Method VBE of
object_Application
failed" error.

Set x = Application.VBE.ActiveVBProject _
References("Microsoft Visual Basic for Applications
Extensibility 5.3")

Myles.


--
Myles
------------------------------------------------------------------------
Myles's Profile:
http://www.excelforum.com/member.php...o&userid=28746
View this thread:
http://www.excelforum.com/showthread...hreadid=529064



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Line of Code to set references


Chip,

I am a bit at sea here. I need the line of code to set the reference
to "Microsoft Visual Basic for Applications Extensibility 5.3"
programmatically and with the same effect as the manual approach ie the
requisite checkbox in the Reference dialogbox becomes ticked.
*Set x = Application.VBE.ActiveVBProject.References("VBIDE" )* fails to
achieve that.

Myles.


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=529064



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Line of Code to set references


I have had some visitation from Gurus Tom & Chip but am still not able
to get what I want. Namely, the code-quivalent of manually settting
VBE reference to "Microsoft Visual Basic for Applications Extensibility
5.3" or "SOLVER" for that matter.

Thanks for any help.


Myles


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=529064

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
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Excel Graphing Line References off when chart is a sheet. DPC Charts and Charting in Excel 0 January 26th 09 04:04 PM
Continue line of VBA code on the next line peacelittleone Excel Programming 9 June 24th 05 07:46 PM
updating add-in references from command line RobinC Excel Programming 0 November 16th 04 04:53 PM
Code to change references Steve[_27_] Excel Programming 0 August 4th 03 11:43 PM


All times are GMT +1. The time now is 08:30 PM.

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

About Us

"It's about Microsoft Excel"