If you know the equation index you will need to use SetEquationAndConfigurationOption Method. It would look like:
lRetVal = swEqMgr.SetEquationAndConfigurationOption(1, """length""=" & newLength, swAllConfiguration, Empty)
Just taking a cursory look, but it appears that your variable name (newlength) is within the quotes. Granted, I've been bouncing around languages lately and this would work fine in a few others, but I believe you will have to exit the quote and drop in your variable outside the quotes. Something like...
newLength = 9
swEqnMgr.Equation(1) = """length""= " & newLength
Again, I haven't tested, just something I know I've tripped up with before myself.
Michael, that line works great, thanks!
Awesome, glad to hear. That one gets me all the time, especially at 2am.