Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Two questions

[1] When I run the code with a user form with RefEdit
controls, when I click in the worksheet to highlight cell
ranges, the arrow keys, Control-Home key, etc. are not
working. Is there a setting that I have to initialize in
the code?

[2] I am using Application.Run "ATPVBAEN.XLA!Regress"
and it works fine. I want to know whether I have to give
only Range objects for Y and X range. Can I give array
objetcs for Y and X range?

Thank you.

-- Dileepan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Two questions

P.

Re Question [1] - The hotfix here seems to cure the problem...

http://support.microsoft.com/?kbid=291110
"XL2000: Cannot Use Keyboard Shortcuts to Select Ranges in RefEdit Control"
It also works for XL20002. I don't know about XL2003.

Regards,
Jim Cone
San Francisco, CA

http://support.microsoft.com/?kbid=291110

"P. Dileepan" wrote in message ...
[1] When I run the code with a user form with RefEdit
controls, when I click in the worksheet to highlight cell
ranges, the arrow keys, Control-Home key, etc. are not
working. Is there a setting that I have to initialize in
the code?
[2] I am using Application.Run "ATPVBAEN.XLA!Regress"
and it works fine. I want to know whether I have to give
only Range objects for Y and X range. Can I give array
objetcs for Y and X range?
Thank you.
-- Dileepan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default Two questions

Re. Question [2]:

The Regress sub only takes ranges, hence the dialog that states
"Regression - Input Y range must be a contiguous reference" if you try
to pass it an array.

Jerry

P. Dileepan wrote:

[1] When I run the code with a user form with RefEdit
controls, when I click in the worksheet to highlight cell
ranges, the arrow keys, Control-Home key, etc. are not
working. Is there a setting that I have to initialize in
the code?

[2] I am using Application.Run "ATPVBAEN.XLA!Regress"
and it works fine. I want to know whether I have to give
only Range objects for Y and X range. Can I give array
objetcs for Y and X range?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Two questions


-----Original Message-----
Re. Question [2]:

The Regress sub only takes ranges, hence the dialog that

states
"Regression - Input Y range must be a contiguous

reference" if you try
to pass it an array.


Thank you for answering my questions. I have a followup.

How can I pass an array as a range? Here is a sample
code:
============================
For i = 1 To n
X(i, 1) = i
X(i, 2) = i*i
Next

AddIns("Analysis ToolPak - VBA").Installed = True
Application.Run "ATPVBAEN.XLA!Regress", Range
(dataRange), _
X, False, False, , "temp", False, False, _
False, False, , False
==============================

The y-range is fine, but X is an array and I am getting
an error. How can I pass X as a "contiguous reference"?

Thank you,

-- Dileepan
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Two questions

Write it to a range on the worksheet and then pass that.

--
Regards,
Tom Ogilvy


"P. Dileepan" wrote in message
...

-----Original Message-----
Re. Question [2]:

The Regress sub only takes ranges, hence the dialog that

states
"Regression - Input Y range must be a contiguous

reference" if you try
to pass it an array.


Thank you for answering my questions. I have a followup.

How can I pass an array as a range? Here is a sample
code:
============================
For i = 1 To n
X(i, 1) = i
X(i, 2) = i*i
Next

AddIns("Analysis ToolPak - VBA").Installed = True
Application.Run "ATPVBAEN.XLA!Regress", Range
(dataRange), _
X, False, False, , "temp", False, False, _
False, False, , False
==============================

The y-range is fine, but X is an array and I am getting
an error. How can I pass X as a "contiguous reference"?

Thank you,

-- Dileepan





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default Two questions

As Tom and I both noted, Regress only accepts worksheet cell range
references as input for x and y. Alternately, everything calculated by
the ATP regression tool is either directly returned by the LINEST
worksheet function, or is easily computable from the values returned by
LINEST. You can call LINEST in VBA as Application.LinEst( ) and you can
pass arrays to LINEST.

Jerry

P. Dileepan wrote:

How can I pass an array as a range? Here is a sample
code:
============================
For i = 1 To n
X(i, 1) = i
X(i, 2) = i*i
Next

AddIns("Analysis ToolPak - VBA").Installed = True
Application.Run "ATPVBAEN.XLA!Regress", Range
(dataRange), _
X, False, False, , "temp", False, False, _
False, False, , False
==============================

The y-range is fine, but X is an array and I am getting
an error. How can I pass X as a "contiguous reference"?


Reply
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
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
2 questions. CelticCharmer Excel Discussion (Misc queries) 4 November 2nd 08 04:33 PM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
007 questions Gklass Charts and Charting in Excel 0 February 4th 07 05:05 PM
2 questions about IF yairl Excel Worksheet Functions 2 May 30th 06 09:58 PM


All times are GMT +1. The time now is 03:13 AM.

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

About Us

"It's about Microsoft Excel"