Reference 物件的 GUID 屬性會傳回識別 Windows 登錄中的型別程式庫的 GUID。 唯讀的 String。
語法
表達。GUID
詞 代表 Reference 物件的變數。
註解
每個類型程式庫都有儲存在登錄中的相關聯 GUID。 當您設定參照到類型程式庫時,Microsoft Access 使用類型程式庫的 GUID 來識別類型程式庫。
使用 AddFromGUID 方法,從類型程式庫的 GUID 建立 Reference 物件。
範例
下列範例會列印 References 集合中每個 Reference 物件的 FullPath、GUID、IsBroken、Major 和 Minor 屬性值。
Sub ReferenceProperties()
Dim ref As Reference
' Enumerate through References collection.
For Each ref In References
' Check IsBroken property.
If ref.IsBroken = False Then
Debug.Print "Name: ", ref.Name
Debug.Print "FullPath: ", ref.FullPath
Debug.Print "Version: ", ref.Major & "." & ref.Minor
Else
Debug.Print "GUIDs of broken references:"
Debug.Print ref.GUID
EndIf
Next ref
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。