+ Reply to Thread
Results 1 to 2 of 2

Type Mismatch when trying to multiply arrays within function

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    NV
    MS-Off Ver
    Excel 2003
    Posts
    1

    Type Mismatch when trying to multiply arrays within function

    I am passing two double arrays to a function that multiplies them together at corresponding indexes and sends back the sum of all products as a double. I know that the function treats the arrays as variant/double arrays but my understanding was that this did not matter. I appreciate your advice and criticism ahead of time. By the way, this code is almost a direct translation from Fortran77 and I am trying to change as little as possible.

    Please Login or Register  to view this content.
    At line 8, AA(i) and BB(i) are coming up as type mismatch. AA and BB are passed in as double arrays and n is passed in as an integer.

    Edit: I just realized I was passing in a doubles and not the entire array. Code was fine after all. Thank you please delete this thread if needed.
    Last edited by weekendwarrior; 07-24-2012 at 03:07 PM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Type Mismatch when trying to multiply arrays within function

    how do you call the function when it errors?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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