Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

適用對象

Reference 物件

Reference 物件的 GUID 屬性會傳回用於在 Windows 登錄中識別類型程式庫的 GUID。 唯讀 String

expression.Guid

運算式 必要。 傳回 [套用至] 清單中其中一個對象的表達式。

備註

GUID 屬性只能在使用 Visual Basic for Applications (VBA) 程式碼時取得。

每個類型程式庫都有關聯的 GUID (儲存在登錄中)。 當您設定類型程式庫的參照時,Microsoft Office Access 2007 會使用類型程式庫的 GUID 來識別類型程式庫。

您可以使用 AddFromGUID 方法根據類型程式庫的 GUID 建立 Reference 物件。

範例

以下範例會將 References 集合物件中每個 Reference 物件的 FullPathGUIDIsBrokenMajorMinor 屬性列印出來:

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

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×