• 156 views | 2 messages Discussion: LEAP
    Topic: Help: Crystal Ball to set values for variables in LEAP Subscribe | Previous | Next
  • Xiaoyu Yan 8/7/2011

    2456 Views

    Dear Tory and Charlie,

    I am trying to write a Macro in Crystal Ball to set values for variables in LEAP. But when I run a script like this 'LEAP.Branch("demand").Variables("sales").Expression = 20', a window will pop up says, Run-time error '438': Object doesn't support this property or method. Do you have any idea what was wrong here?

    Many thanks and best wishes,
    Xiaoyu
  • Charlie Heaps 8/8/2011
      Best Response

    2454 Views

    H Xiaoyu,

    I am posting a reply here so all can benefit even though I already email you....

    I think there are two problems with that expression.

    1. I think you need to write .Variable not .Variables. That causes the 438 error I think. For more on that and other VBScript errors, see this: http://msdn.microsoft.com/en-us/library/xe43cc8d(v=vs.85).aspx

    2. Please note that the sales variables does not exist at the demand branch (only at one level down from that). Try something like this instead.

    leap.Branch("demand\cars").Variable("sales").Expression = "20"