You’ve been told some information that doesn’t always work to fix your slice. A slicer tends to swing from the outside-in, and simply closing your stance doesn’t change that swing path. What it tends to do is cause you to pull the ball.
Lee Trevino used a different approach. Trevino opened his stance, aimed the face where he wanted the ball to finish and then took a backswing along his feet line and made a shallowing move on the downswing to produce his desired ball flight.