Hi
I am looking for some help with the r squared function in VBA
I have a userform with textboxes where X and Y values are entered.
What I am stuck with is how to get the values of the textboxes into the r squared argument.
Here is what I have tried so far.
I just don't know how to get the Y's and X's values into the rsquared function correctly.
Thanks
I am looking for some help with the r squared function in VBA
I have a userform with textboxes where X and Y values are entered.
What I am stuck with is how to get the values of the textboxes into the r squared argument.
Here is what I have tried so far.
Code:
Sub test()
theys = UserForm1.TextBox1.Value ,UserForm1.TextBox2.Value,UserForm1.TextBox3.Value
thexs = UserForm1.TextBox4.Value,UserForm1.TextBox5.Value,UserForm1.TextBox6.Value
ans = Application.WorksheetFunction.RSq(theys, thexs)
MsgBox (ans)
End Sub
I just don't know how to get the Y's and X's values into the rsquared function correctly.
Thanks