If on a complaint by the owner of any premises it appears to the sheriff that the occupier of those premises prevents the owner from executing any work which he is required to execute by or under this Act or any local enactment incorporating any provisions contained in Schedule 4 or by or under any byelaws made under this Act or under any such enactment, the sheriff may authorise the owner to enter for the purpose of executing the work.