LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Tools | References - information about references

Hello --

Some code was posted here to list all current references to a worksheet.
Can someone tell me what .Major and .Minor mean?

Can I get other information about a reference, such as Version? What part
of the Object Browser contains this information?

Thanks for any help.

L Mehl
'------------------------------------

' Description, Name, GUID, #MAjor, #Minor, full path.

Dim refReference
Dim i As Integer, x As Integer
Dim iWorksheets As Integer, Y As Integer
Dim strResultsTableName As String

strResultsTableName = "Active VBE References"

'Count number of worksheets in workbook
iWorksheets = ActiveWorkbook.Sheets.Count

'Check for duplicate Worksheet name
i = ActiveWorkbook.Sheets.Count
For x = 1 To i
If Windows.Count = 0 Then Exit Sub
If UCase(Worksheets(x).Name) = UCase(strResultsTableName) Then
Worksheets(x).Activate
If Err.Number = 9 Then
Exit For
End If
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
'Exit Sub
End If
Next

'Add new worksheet at end of workbook
' where results will be located
Worksheets.add.Move after:=Worksheets(Worksheets.Count)

'Name the new worksheet and set up Titles
ActiveWorkbook.ActiveSheet.Name = strResultsTableName
ActiveWorkbook.ActiveSheet.Range("A1").Value = "Description"
ActiveWorkbook.ActiveSheet.Range("B1").Value = "Name"
ActiveWorkbook.ActiveSheet.Range("C1").Value = "GUID"
ActiveWorkbook.ActiveSheet.Range("D1").Value = "#Major"
ActiveWorkbook.ActiveSheet.Range("E1").Value = "#Minor"
ActiveWorkbook.ActiveSheet.Range("F1").Value = "Path"

ActiveCell.Offset(1, 0).Select
For Each refReference In Application.VBE.ActiveVBProject.References
With ActiveCell
.Value = refReference.Description
.Offset(0, 1).Value = refReference.Name
.Offset(0, 2).Value = refReference.GUID
.Offset(0, 3).Value = refReference.Major
.Offset(0, 4).Value = refReference.Minor
.Offset(0, 5).Value = refReference.FullPath
.Offset(1, 0).Select
End With
Next

' ...


 
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
Equivalent option for Tools-References in Excel 2007 Saran Excel Discussion (Misc queries) 2 September 22nd 09 10:41 PM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
How to rename references from range names to cell references Abbas Excel Discussion (Misc queries) 1 May 24th 06 06:18 PM
Tools>References greyed out Atchoum Excel Discussion (Misc queries) 3 March 4th 05 12:24 AM
Problem with VBE Menu -- Tools References JON-JON Excel Programming 1 September 11th 03 07:20 AM


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