The B7040 is a short but scenic road in south Lanarkshire. In 1922 the route was unclassified and little more than a track but still managed to gain Class II status by 1932. It has four cattle grids and sheep roam the road.
The route starts at a crossroads on the B797 in the north of Leadhills village and heads east out of town along Elvanfoot Road. A couple of windy bends take it past half a dozen or so properties, and then its out onto the open moorland. It crosses a burn and follows the wide but shallow valley floor south eastwards, quickly rounding a corner which reveals a narrow pass ahead. The first of four cattle grids is crossed as the route enters this pass, climbing a little between steep slopes. The lower part of the slope, particularly on the left, is loose stone with outcrops of rock, and heather above. This suggests that the valley was perhaps quarried at some point in the past, and old maps show both quarries and old lead mines marked along the roadside here. The summit of the routes, at about 420m, is reached fairly quickly, however, and the route then descends into the valley of the Shortcleuch Water, the main tributary of the Elvan Water, which is followed for the rest of the route.
As the road winds out of the pass, it drops quite steeply, passing above a lonely cottage, before levelling off a little at the edge of the valley floor. This can be a barren and desolate place at times, but there are also some spectacular views as the valley twists and turns, and there are a handful of places where visitors can pull in to enjoy the landscape. The road twists and turns, following the valley downstream as it gets wider and the terrain a little more hospitable. At times the road is squeezed between steep slopes and the small burn, with old stone retaining walls on the hillside and gabion baskets on the riverbank. Then the burn meanders away again, and the road climbs slightly across an easier slope, before dipping back down to the riverbank. Numerous tributaries are crossed, with side valleys on the opposite side giving glimpses of the distant rounded hills beyond. A long left hand curve sees the road drop back towards the burn as the valley sides seem to close in. The final turn of the corner reveals a flatter landscape beyond, and once more the valley widens and the road climbs a little to offer views across Clydesdale ahead.
Greener fields appear, and then a farm can be seen on the far side of the widening valley. Over a bump, another farm lies ahead on the roadside. The road then crosses another cattle grid and passes a large substation site on the right. A short distance later, a final cattle grid is crossed as the route enters Elvanfoot, where the Elvan Water flows into the River Clyde. A handful of properties are passed before the B7040 reaches a T-junction and ends on the A702.