+ Reply to Thread
Results 1 to 4 of 4

VBA Mismatch Error

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    Boulder, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    2

    VBA Mismatch Error

    Hello everyone,

    I'm currently having a problem with my code that runs the Euler Method of Approximation. It is running from a User Form and I can get the code for the equation and all of that, I am just having a problem with the Dim statements for y and t. Any suggestions on what the variables should be declared as? The values of tf, ti, h, x0, a, b, c, d, and e are all defined in the input boxes of the User Form. Thanks in advance.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    06-27-2006
    Posts
    310

    Re: VBA Mismatch Error

    You are treating y and t as arrays but you never dimensioned them as arrays.
    And then when you call the message box you treat y as a non array.
    Last edited by SuitedAces; 11-13-2012 at 08:25 PM.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Mismatch Error

    Try something like this. (I made a few assumptions)


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-13-2012
    Location
    Boulder, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: VBA Mismatch Error

    Thanks for the information. I eventually figured it out by basically writing it out a different way, but its valuable to know for the future.

+ 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