Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Oh mighty monks... I'm having a slight problem with converting the lines starting with .HasAxis. It doesn't give an error or warning, it just doesn't work.

ActiveChart.PlotArea.Select ActiveChart.ChartArea.Select With ActiveChart .HasAxis(xlCategory, xlPrimary) = False .HasAxis(xlValue, xlPrimary) = False End With ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic

Replies are listed 'Best First'.
Re: Hopefully simple Excel question...
by InfiniteSilence (Curate) on Dec 15, 2005 at 20:33 UTC
    Have you tried,

    $myActiveChart->HasAxis($the_constant_value_I_looked_up_already, $ditt +o) = 0;#?guess
    You might try to look up 'Excel' in the search and, if possible, post your Perl version of your code.

    Celebrate Intellectual Diversity

      Grandfather. Sorry about that. I was (chose one of the 2 F words) around and since I didn't see the post there after doing a refresh I thought maybe I didn't create it. Apologize for any inconvenience. Oh by the way I had tried that code and it didn't work.
      The correct syntax to set the Excel chart's HasAxis-Property in Perl looks like this:
      $myActiveChart->SetProperty('HasAxis',[2,1],0);
      The second parameter is an Array that contains the parameters that shall be passed to the property-method.
      My example is equivalent to this VBA-Code:
      myActiveChart.HasAxis(xlValue,xlPrimary)=False
      Tested and works!
Re: Hopefully simple Excel question...
by GrandFather (Saint) on Dec 15, 2005 at 20:44 UTC

    Note that your duplicate of this post will likely be reaped and in any case is unlikely to be approved (which is why you can't see it).

    This post was edited to make it readable. In future preview to see that the formatting is as you want it and read Writeup Formatting Tips if you need help. There is a link immediately above the text edit box when you preview.

    Consider becoming a monk, we can help you more if you do.


    DWIM is Perl's answer to Gödel
Re: Hopefully simple Excel question...
by marto (Cardinal) on Dec 16, 2005 at 00:30 UTC