It depends on whether it's the subject or object.
Delete "Barney and" and look at what is left in the sentence. It should then be easier to tell which is correct:
"I am going out." ... therefore ... "Barney and I are going out."
"They insulted me." ... therefore ... "They insulted Barney and me."
and so on.