I am assuming this is an electric slide. If so start by having the batteries load tested to see that they really are all good. Next clean all battery connectors and all wiring connections to the slide motor. Pay special attention to how the slide motor is grounded and clean the ground connection. Using a good dry silicone spray on all moving parts won't hurt either. If that does not fix the problem the next thing to look for would be interlocks which can vary from one manufacturer to another as to what keeps the slides from operating such as emergency brake must be on, ignition must be off, etc.
Brian, Loretta & Daisy (Golden Retriever)
2008 Holiday Rambler Endeavor 40 PDQ , ISL 400
2014 Ford Explorer toad