Skip to main content

[archive] Modifying Xvalue of Chart in Excel

  • January 10, 2008
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 09 January 2008]

I am trying to adjust the Xvalue of a chart but can't get it to work.


MODIFY Serie @XValues "=Weekcijfers Aerosols'!R15C3:R32C3"

When I do MODIFY Serie @XValues "test" it works fine.

Can someone tell me what I am doing wrong.

Thanks
Andre

3 replies

[Migrated content. Thread originally posted on 09 January 2008]

I am trying to adjust the Xvalue of a chart but can't get it to work.


MODIFY Serie @XValues "=Weekcijfers Aerosols'!R15C3:R32C3"

When I do MODIFY Serie @XValues "test" it works fine.

Can someone tell me what I am doing wrong.

Thanks
Andre
XValues are supposed to be either a variant array (see example of how to create a safearray in documentation using C$SETVARIANT) or a handle of a range.
The reason your latter example works, is because the COM engine apparently is forgiving and accepts the "test" as a single item safearray.

[Migrated content. Thread originally posted on 09 January 2008]

I am trying to adjust the Xvalue of a chart but can't get it to work.


MODIFY Serie @XValues "=Weekcijfers Aerosols'!R15C3:R32C3"

When I do MODIFY Serie @XValues "test" it works fine.

Can someone tell me what I am doing wrong.

Thanks
Andre
XValues are supposed to be either a variant array (see example of how to create a safearray in documentation using C$SETVARIANT) or a handle of a range.
The reason your latter example works, is because the COM engine apparently is forgiving and accepts the "test" as a single item safearray.

[Migrated content. Thread originally posted on 09 January 2008]

I am trying to adjust the Xvalue of a chart but can't get it to work.


MODIFY Serie @XValues "=Weekcijfers Aerosols'!R15C3:R32C3"

When I do MODIFY Serie @XValues "test" it works fine.

Can someone tell me what I am doing wrong.

Thanks
Andre
Yes it works with handle Range.

Thanks,
Andre