So I made some progress on this and could perhaps use a little help.
I'm trying to check if 2 connections exist and if they do not, then add them. This is partially working but not quite correct. I know in testing if one connection exist, it is not adding the other one.
I think also that I do need to check if any connections exist first (count). As attempting to loop and if no connections are found, they are never added?
EDIT. I caught an error where I using ThisWorkbook vs ActiveWorkbook. But now when I run the code, it will keep adding/duplicating the connection even though it already exists?
I think I understand the logic/cause on why it is duplicating, but not sure about how to fix yet. I guess when it loops the connection names, the first loop will see it doesn't match one of the names, thus get's added.
Bookmarks