Heat butter in a large saucepan over medium heat; stir in sugar, milk, cocoa powder, and salt. Bring mixture to a boil until sugar dissolves, 7 to 8 minutes. Do not stir while boiling. Remove saucepan from heat; stir in oats, coconut, and vanilla extract.
Drop coconut mixture by spoonfuls onto prepared baking sheet. Refrigerate until set, at least 1 hour.