0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【ExcelVBA】指定したワークブックの参照設定を配列で取得する(Basic > GetData > Config)

Last updated at Posted at 2023-06-28
Option Explicit

Private basic As basic

Public Property Set setBasic(ByRef obj As basic)

    Set basic = obj

End Property
Public Function references(ByRef wb As Workbook) As String()

    Dim ref As Object
    
    Dim result() As String
    
    Dim refCount As Long
    Dim i As Long
    
    refCount = wb.VBProject.references.Count
    ReDim result(1 To refCount, 1 To 2)

    For i = LBound(result, 1) To UBound(result, 1) Step 1
    
        Set ref = ThisWorkbook.VBProject.references.Item(i)
        
        result(i, 1) = ref.Description
        result(i, 2) = ref.FullPath
        
    Next i
    
    references = result
    
End Function
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?