+ Reply to Thread
Results 1 to 4 of 4

vba code running too slow

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Post vba code running too slow

    Hi,
    i am trying to solve non-linear equations using gauss-siedel. somehow, the code take longer to run. please advise thanks


    Please Login or Register  to view this content.
    Last edited by hitsujicute; 03-31-2013 at 06:22 PM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: vba code running too slow

    Hi and welcome to the forum.

    Pls take few minutes to read the rules of the forum, because:

    Your post does not comply with rule 3 of our forum.Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button).
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: vba code running too slow

    sorry about that. please kindly refer the attached excel file
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: vba code running too slow

    When exacly do you want to leave the Do Loop?

    This is saying loop until all the conditions are met.
    Please Login or Register  to view this content.
    Also, you have this,
    Please Login or Register  to view this content.
    which I think is supposed to deal with the problem of an infinite loop, but all it does is put 'diverges' in a cell.

    If you want to exit the loop if counter exceeds maxItteration perhaps you should add Exit Do before the End If.

    PS Can you edit your post to add code tags? Not everyone will be able to download your workboook
    If posting code please use code tags, see here.

+ 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