Results 1 to 15 of 15

Code breaking at one line

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    107

    Code breaking at one line

    Hi,

    I know this is a long shot and I'm hoping that someone will be able to fix this without having to go through 100's of lines of script. I have a page of VBA code and basically the code runs fine until there are more than 5 instances of what I'm actually doing. If you see the excel spreadsheet attached I'm basically building up a decision tree. I select the number of branches and nodes based on a user form. Once there are more than 5 branches the code breaks. Here is the section of code that gets highlighted in the debug mode 'ActiveSheet.Cells(m1(i).point, colc).Formula = "=" & ActiveSheet.Cells(m1(i).point, colc - 1).Address & "*" & ActiveSheet.Cells(m2(tempflag).point, colc - 4).Address' but this is only highlighted in the second instance.

    HTML Code: 
    HTML Code: 
    Is there anyway to rewrite this statement or can you suggest reasons as to why it breaks? Attached is an excel sheet with the outcome of the vba:
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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