Ants are found on plants, they are probably attracted to the sweet honeydew deposited on the plants by honeydew-producing insects such as aphids or soft scales. Ants may also be attracted up into trees or shrubs by floral nectar or ripening or rotten sweet fruit. These ants can be kept out by banding tree trunks with sticky substances such as Tanglefoot. Trim branches to keep them from touching structures or plants so that ants are forced to try to climb up the trunk to reach the foliage.