+ Reply to Thread
Results 1 to 5 of 5

XL2000: Creating scenario crashes Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    6500' in the Sierra Nevada
    MS-Off Ver
    Office 2007, 2010
    Posts
    74

    Re: XL2000: Creating scenario crashes Excel

    In an experiment I used Scenarios.Add (with range names and values created by the above code) to create a scenario in a new, otherwise unused worksheet. I was able to get to the scenario (via Tools, Scenarios...) without crashing. So clearly there is something about the Consolidation sheet that does not like having a scenario created. It's not the code, it's the sheet.

    Edit: So I tried a copy & paste values of the sheet to a new workbook. Ran the above code (less the Scenario.Delete) and it also crashes on Tools, Scenarios.

    Ugh!

    g
    Last edited by geoB; 03-06-2011 at 05:23 PM. Reason: more info

  2. #2
    Registered User
    Join Date
    03-05-2009
    Location
    6500' in the Sierra Nevada
    MS-Off Ver
    Office 2007, 2010
    Posts
    74

    A Bug?!

    I have identified a difference in behavior between XL2000 & XL2007 that is most likely the source of error. In the code above I added/changed the last couple of lines to read
    Debug.Print "Addresses before: " & Range(strAddresses).Count
    sht.Scenarios.Add Name:="test", ChangingCells:=sht.Range(strAddresses), Values:=arrValues
    Debug.Print "Addresses after: " & sht.Scenarios("test").ChangingCells.Count
    XL2000 prints:
    Addresses before: 27
    Addresses after: 22
    XL2007 prints:
    Addresses before: 27
    Addresses after: 27
    Clearly, XL2000 is truncating the address set.
    Sure looks like a bug to me!
    g

+ Reply to Thread

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