If you create a data area on the spreadsheet and an area where the lines
function displays its results the user would just have to put the x values and
the y values in the data area and the results of the linest function would
display automatically. The user would not need to understand how to set up
the function as you would already have done that on the worksheet. This is
the simple straightforward way of doing it.
If you want to make it more complicated you will create a userform with two
textboxes for the x and y inputs, an enter button which transfers the pair of
values to the spreadsheet and a calculate button which would close the
userform. The linest function would still be in the spreadsheet (put there by
you) not generated when the spreadsheet is in use. Then you would have a
button to open the userform. I do not think this is a sensible way to do it.