Inputbox/Regression Problem

M

MattB

Hi,

I'm very new to VBA and I'm having trouble writing a macro which allow
a user to select an x range, which will be returned in the regressio
output. Here's what I have so far:

'Sub InputBox()
Dim XRng As Range
Set XRng = Application.InputBox(prompt:="Select range of X"
Type:=8)
XRng.Select

Application.Run "ATPVBAEN.XLA!Regress", ActiveSheet.Range("A1:A"
Cells(Rows.Count, "A").End(xlUp).Row), _
ActiveSheet.Range("XRng"), False, True,
ActiveSheet.Range("$L$1") _
, False, False, False, False, , False

End Sub

Any help would be appreciated.

Thanks,

Mat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top