dbTalk Databases Forums  

Database Reference info via VBA

comp.databases.ms-access comp.databases.ms-access


Discuss Database Reference info via VBA in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ManningFan
 
Posts: n/a

Default Database Reference info via VBA - 08-13-2010 , 08:51 AM






I've got as little form that will list all the references a database
has selected in a textbox, because we all know that when you click
Tools/References in a VBA Editor window you sometimes can't see the
whole path.

My question is, is there a way to see the nice definition that the
References dialog box shows? For example, the References dialog box
shows "Microsoft Excel 10.0 Object Library", and using refItem.Name
all I see is "Excel".

Reply With Quote
  #2  
Old   
Barry Edmund Wright
 
Posts: n/a

Default Re: Database Reference info via VBA - 08-13-2010 , 09:21 AM






Hi Manning,

Is this what you want?
Just call the Function DisplayRefInfo from a button on a form.


'Displays all the references used by the database
Public Function DisplayRef() As String
Dim intCurrRef As Integer
For intCurrRef = 1 To References.Count

DisplayRef = DisplayRef & " Name: " &
References(intCurrRef).Name & CR & _
"Full Path: " &
References(intCurrRef).FullPath & CR & _
" Broken?: " &
References(intCurrRef).IsBroken & CR & CR

Next intCurrRef

End Function

Public Function DisplayRefInfo()

DisplayRef
MsgBox DisplayRef, vbInformation, DLookup("strApplicationName",
"tblSplash") & " Reference Information"

End Function

Cheers,
Barry


On Aug 13, 9:51*am, ManningFan <manning... (AT) gmail (DOT) com> wrote:
Quote:
I've got as little form that will list all the references a database
has selected in a textbox, because we all know that when you click
Tools/References in a VBA Editor window you sometimes can't see the
whole path.

My question is, is there a way to see the nice definition that the
References dialog box shows? *For example, the References dialog box
shows "Microsoft Excel 10.0 Object Library", and using refItem.Name
all I see is "Excel".

Reply With Quote
  #3  
Old   
Tony Toews
 
Posts: n/a

Default Re: Database Reference info via VBA - 08-16-2010 , 06:53 PM



On Fri, 13 Aug 2010 06:51:13 -0700 (PDT), ManningFan
<manningfan (AT) gmail (DOT) com> wrote:

Quote:
My question is, is there a way to see the nice definition that the
References dialog box shows? For example, the References dialog box
shows "Microsoft Excel 10.0 Object Library", and using refItem.Name
all I see is "Excel".
Watch for word wrap on several lines.

Sub DebugPrintReferencesIDE()

' For the following line of code to refIDE to work a reference must be
set to
' Microsoft Visual Basic for Applications Extensibility 5.3
'Dim refIDE As VBIDE.Reference
' Or you can use late binding as per the following line
Dim refIDE As Object

For Each refIDE In
Access.Application.VBE.ActiveVBProject.References
Debug.Print refIDE.Description & " " & _
IIf(refIDE.IsBroken, "Broken", "") & vbCrLf & _
" " & refIDE.name & " - " & refIDE.Major & "." &
refIDE.Minor & " " & refIDE.FullPath
Next refIDE

End Sub

Now I don't know if the runtime ships with the VBE6EXT.OLB or not. I
rather doubt it and it might not be legally redistributable.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #4  
Old   
ManningFan
 
Posts: n/a

Default Re: Database Reference info via VBA - 08-17-2010 , 12:19 PM



On Aug 16, 7:53*pm, Tony Toews <tto... (AT) telusplanet (DOT) net> wrote:
Quote:
Now I don't know if the runtime ships with the VBE6EXT.OLB or not. I
rather doubt it and it might not be legally redistributable.

Tony
Tony -
This was it. I had similar code to what Barry had, but it looks
like the VBE gives you a bit more information. Thanks!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.