I am logging out, as it is 0604 hrs here; so not tested,,, but believe below basic code should help:
Sub AddReference()
'Macro purpose: To add a reference to the project using the GUID for the reference library
Dim strGUID As String
'Update the GUID you need below.
strGUID = "{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}"
'Set to continue in case of error
On Error Resume Next
'Add the reference
ThisWorkbook.VBProject.References.AddFromGuid _
GUID:=strGUID, Major:=1, Minor:=0
'If an error was encountered, inform the user
Select Case Err.Number
Case Is = 32813
'Reference already in use. No action necessary
Case Is = vbNullString
'Reference added without issue
Case Else
'An unknown error was encountered, so alert the user
MsgBox "A problem was encountered trying to" & vbNewLine _
& "add or remove a reference in this file" & vbNewLine & "Please check the " _
& "references in your VBA project!", vbCritical + vbOKOnly, "Error!"
End Select
On Error GoTo 0
End Sub