The above image shows 3 cells containing the form
I had the same problem and solved with below:
Range("A").Formula = Trim(CStr("the formula"))