Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile Errors and Missing references


Hi,

I have this excel application which gives compile error (Compile erro
in hidden module) on some user's machine. I want to verify that th
error is due to a missing reference, but I cannot ask the user to chec
his references.

What I would like to do is while opening the excel file, check all th
active references, for which I used the following code:

Sub check_references()

Dim rVBReference As VBIDE.Reference

Set wbBook = ThisWorkbook

With wbBook

'Iterate through the collection of active external references i
the VB-project.

For Each rVBReference In .VBProject.References
Debug.print rVBReference.Name
Next rVBReference

End With

End Sub

My problem is:
1. I either get "Method VBProject of object workbook failed", or
2. "cannot trust programmatical access to VBProject"

Any solutions....

Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=27309

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Compile Errors and Missing references

Hi
maybe use late binding. see:
http://www.xldynamic.com/source/xld.EarlyLate.html

"mangesh_yadav" wrote:


Hi,

I have this excel application which gives compile error (Compile error
in hidden module) on some user's machine. I want to verify that the
error is due to a missing reference, but I cannot ask the user to check
his references.

What I would like to do is while opening the excel file, check all the
active references, for which I used the following code:

Sub check_references()

Dim rVBReference As VBIDE.Reference

Set wbBook = ThisWorkbook

With wbBook

'Iterate through the collection of active external references in
the VB-project.

For Each rVBReference In .VBProject.References
Debug.print rVBReference.Name
Next rVBReference

End With

End Sub

My problem is:
1. I either get "Method VBProject of object workbook failed", or
2. "cannot trust programmatical access to VBProject"

Any solutions....

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=273090


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
PDFMaker and Compile Errors LinKay Excel Discussion (Misc queries) 2 February 5th 08 06:10 PM
Compile Errors with Different versions of Excel PStephens Excel Discussion (Misc queries) 2 March 14th 05 04:27 PM
compile errors johnny Excel Discussion (Misc queries) 1 February 24th 05 11:49 PM
Handle Compile Errors JeffT Excel Programming 1 October 14th 04 01:38 PM
Compile Errors Patricia[_3_] Excel Programming 2 October 17th 03 11:48 AM


All times are GMT +1. The time now is 08:36 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"