Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: What is wrong with this VBA code?

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This function displays #value if the matrix dimension is greater than 73*73! It works fine otherwise
    Any pointers on why I am having problems would be great.
    Thanks,
    Karraj

    Function fullmatrix(matrix) As Variant
    Set therange = matrix
    nrows = matrix.Rows.Count
    ReDim matrix(1 To nrows, 1 To nrows) As Double
    Dim outp1() As Double
    ReDim outp1(1 To nrows, 1 To nrows)
    For i = 1 To nrows
    For j = 1 To i
    outp1(i, j) = therange.Cells(i, j)
    Next
    Next
    For j = 1 To nrows
    For i = j + 1 To nrows
    outp1(j, i) = outp1(i, j)
    Next
    Next




  2. #2
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,607
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I think maybe you forgot the end of the function?

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I forgot to cut/copy paste the endfunction. My code has it.
    Karraj

  4. #4
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,607
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    What exactly are you trying to accomplish with this? You don't set anything to fullmatrix...

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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