View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MattB[_3_] MattB[_3_] is offline
external usenet poster
 
Posts: 1
Default Inputbox/Regression Problem


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

--
Matt
-----------------------------------------------------------------------
MattB's Profile: http://www.excelforum.com/member.php...fo&userid=3168
View this thread: http://www.excelforum.com/showthread.php?threadid=51376