if I run a optical cable from my sound bar to my cable box will I have surround sound

Solution
The optical connection can support surround if both the cable box and sound bar support it. This would typically mean having a decoder in the sound bar.