LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Inputbox/Regression Problem

Hi,

I'm a VBA novice and have found this group helpful in my learning, but
I'm stuck with a particular piece of coding. What I'm trying to do is
allow the user to select a Y and X range using an inputbox, which will
then be used for a regression. Here's the problematic part of the
macro:

Dim piRange As Range
On Error Resume Next
Set piRange = Application.InputBox(prompt:="Select pi range",
Title:="SELECT STANDARDISED RESIDUALS", Type:=8)
If Not piRange Is Nothing Then
MsgBox "You selected: " & piRange.Address
Else
MsgBox "pi range is undefined because you cancelled."
End If

Dim xRange As Range
On Error Resume Next
Set xRange = Application.InputBox(prompt:="Select x range with
mouse", Title:="SELECT INDEPENDENT VARIABLES", Type:=8)
If Not xRange Is Nothing Then
MsgBox "You selected: " & xRange.Address
Else
MsgBox "x range is undefined because you cancelled."
End If

Application.Run "ATPVBAEN.XLA!Regress", _
ActiveSheet.Range(piRange), ActiveSheet.Range(xRange), False,
False, , _
ActiveSheet.Range("$AF$1"), False, False, False, False, , False


Thanks in advance,

Matt

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inputbox/Regression Problem MattB[_3_] Excel Programming 0 February 17th 06 06:29 PM
Problem seting-up Regression Macro Confused VB Person Excel Discussion (Misc queries) 1 February 9th 05 08:05 AM
Problem with focusing on Application.Inputbox type:= 8 masayoshi hayashi Excel Programming 0 September 16th 04 10:15 AM
Inputbox for Worksheet name - problem Stuart[_5_] Excel Programming 3 February 13th 04 07:02 PM
InputBox Method Logic Problem ExcelMonkey[_20_] Excel Programming 2 January 24th 04 04:47 AM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"