'Lists path and GUID (Globally Unique Identifier) for each referenced library. Here is how to get the Guid's programmatically! You can then use these guids/filepaths with an above answer to add the reference! The code above does not need the reference to the "Microsoft Visual Basic for Applications Extensibility" object anymore. AddFromGuid sGuid, 0, 0 ' 0,0 should pick the latest version installed on the computerĮH: MsgBox "Error in 'AddRef'" & vbCrLf & vbCrLf & err.Description Sub AddRef(wbk As Workbook, sGuid As String, sRefName As String) I know there are ways to do it in Access Vb.net and code similar to this kept popping up, but I'm not sure I understand it, or if it's relevant: _ But that's not very useful for my purposes. I know how to do it manually: Open VBE -> Tools -> References -> browse -_> File Location and Name. I can't seem to figure out how to add a reference programmatically to Excel 2007 using VBA. I had planned on putting the reference in a shared location, and adding it programmatically when the program ran. I was hoping to avoid setting up the reference by hand. All of the other computers need to be able to run this program. We have a dozen or so computers on a network and a shared file server (among other things). I need to add a reference for Skype4COM.dll in order to send a message through Skype. I've written a program that runs and messages Skype with information when if finishes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |