Hi all,

I'm trying to complete the below small VBA project. For those who are curious, I'm following a free online VBA course through Cal Poly Ponoma. I'm not doing this course for credit, I am merely trying to improve my knowledge of Excel VBA and am stuck on this project.

Below is the project, and I've pasted the code I wrote below as well. When trying to run the macro, I receive a "Subscript Out Of Range" error and I cannot figure out why. I am not looking for code that would complete this project because I already have the "answer". Instead, I am trying to discover why the code that I wrote doesn't work. Thanks!

Project:
Enter any 20 numbers you wish into cells A1 through E4 in Sheet3. Create a run button that executes a macro named problem3. This macro will switch the values in two rows that are specified by the user by completing the following tasks:
Obtain the numbers of the two rows that will be switched from cells I8 and I9. The numbers must be an existing
row number (i.e., 1, 2, 3, 4). If either of the two numbers are not 1 through 4, tell the user that the row numbers are
not valid and quit the program.
Obtain all 20 values and store them in a 2D array named nums.
Switch the values in the two rows.
Here is a picture example:
http://imgur.com/a/xV5R6?

Here is the code I wrote:
Code:
Option ExplicitOption Base 1


Sub problem3()
Const nrow As Integer = 4, ncol As Integer = 5
Dim nums1(nrow, ncol) As Double, nums2(nrow, ncol) As Double
Dim rowA As Double, rowB As Double, i As Double, j As Double


'Gather which two rows to switch
rowA = Worksheets("Sheet3").Range("I8").Select
rowB = Worksheets("Sheet3").Range("I9").Select


'Populate Array "nums1" with data
Worksheets("sheet3").Range("A1").Select
For i = 1 To nrow
    For j = 1 To ncol
        nums1(i, j) = ActiveCell.Value
        ActiveCell.Offset(0, 1).Select
    Next j
    ActiveCell.Offset(1, -ncol).Select
Next i


'Switch rows A and B in a second array "nums2"
For j = 1 To ncol
    nums2(rowA, j) = nums1(rowB, j)
    nums2(rowB, j) = nums1(rowA, j)
Next j


'Populate array "nums1" with swapped rows
For j = 1 To ncol
    nums1(rowA, j) = nums2(rowB, j)
    nums1(rowB, j) = nums2(rowA, j)
Next j


'Print new matrix
Range("a1").Select
For i = 1 To nrow
    For j = 1 To ncol
    ActiveCell.Value = nums1(i, j)
    ActiveCell.Offset(0, 1).Select
    Next j
    ActiveCell.Offset(1, -ncol).Select
Next i


End Sub