Results 1 to 7 of 7

Range Selection Error

Threaded View

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    U.S.
    MS-Off Ver
    Excel 2003
    Posts
    21

    Range Selection Error

    I am having some trouble with a variable range selection within a regression. I keep getting an "application-defined or object-defined error." I've isolated each statement to find that the code that is causing the regression not to work is below (the error for that line of code states that the Select method of Range class failed):

    Sheets("Index").Range("$A$1:$D$" & regressionWindow)


    This is confusing because the following code works in a different module:

    Sheets("Index").Range("$A$1:$D$" & indexMonthsCount)

    This is the full regression code for the one that is not working:

    Application.Run "ATPVBAEN.XLA!Regress", Sheets("Transpose") _
            .Range("$A$ & counter3:$A$" & regressionWindow), Sheets("Index") _
            .Range("$A$ & counter3:$D$" & regressionWindow), _
            False, True, , "fund", False, False, False, False, , False

    (regressionWindow = counter3 + 36)


    Thank you for any help you can offer on this issue
    Last edited by emadden; 06-09-2009 at 05:01 PM. Reason: solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1