Hey all,
Excel 2007 and Windows XP are my particulars.
I have VBA code that works very well, but it needs a little tweaking. I've tried several things myself, but keep getting errors.
The code checks to see if a reference exists; if it does, then it exits the sub. If it does not, it adds it and runs a macro.
Here's what I want it to do:
The code checks to see if a reference exists; if it does, runs a macro and then it exits the sub. If it does not, it adds it and runs a macro.
The code:
Thanks!
Excel 2007 and Windows XP are my particulars.
I have VBA code that works very well, but it needs a little tweaking. I've tried several things myself, but keep getting errors.
The code checks to see if a reference exists; if it does, then it exits the sub. If it does not, it adds it and runs a macro.
Here's what I want it to do:
The code checks to see if a reference exists; if it does, runs a macro and then it exits the sub. If it does not, it adds it and runs a macro.
The code:
Code:
Sub e8a2ad2182454361bba1f17debd02f3b_Click()
Dim Reference As Object
With ThisWorkbook.VBProject
For Each Reference In .References
If Reference.Description Like "Reporter Bridge" Then Exit Sub
Next
.References.AddFromGuid "{F8E5D4DE-ED63-43DE-A82F-68DC97B68A5E}", 2, 4
End With
Call Bubba
End Sub
Thanks!