PC Review


Reply
Thread Tools Rate Thread

Axes(xlCategory).CategoryNames

 
 
=?Utf-8?B?QkhhdE1K?=
Guest
Posts: n/a
 
      22nd May 2007
I am trying to assign labels to the tickmarks on a chart in an Excel module.
I have the following code:

label = "all the same"
For Each tick In chtObj.Chart.Axes(xlCategory).CategoryNames
tick = label
Next

I am getting an error because of a type mismatch. It appears that
chtObj.Chart.Axes(xlCategory).CategoryNames is typed as "Variant/Double".

Can anyone help?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      22nd May 2007
Can you set Label to Variant/Double?

"BHatMJ" wrote:

> I am trying to assign labels to the tickmarks on a chart in an Excel module.
> I have the following code:
>
> label = "all the same"
> For Each tick In chtObj.Chart.Axes(xlCategory).CategoryNames
> tick = label
> Next
>
> I am getting an error because of a type mismatch. It appears that
> chtObj.Chart.Axes(xlCategory).CategoryNames is typed as "Variant/Double".
>
> Can anyone help?

 
Reply With Quote
 
=?Utf-8?B?QkhhdE1K?=
Guest
Posts: n/a
 
      23rd May 2007
The labels are text strings so I need a way of changing CategoryNames (I
think)?

"Barb Reinhardt" wrote:

> Can you set Label to Variant/Double?
>
> "BHatMJ" wrote:
>
> > I am trying to assign labels to the tickmarks on a chart in an Excel module.
> > I have the following code:
> >
> > label = "all the same"
> > For Each tick In chtObj.Chart.Axes(xlCategory).CategoryNames
> > tick = label
> > Next
> >
> > I am getting an error because of a type mismatch. It appears that
> > chtObj.Chart.Axes(xlCategory).CategoryNames is typed as "Variant/Double".
> >
> > Can anyone help?

 
Reply With Quote
 
=?Utf-8?B?QkhhdE1K?=
Guest
Posts: n/a
 
      23rd May 2007

Thanks for the help. I found syntax that works.
(example)
chtObj.Chart.Axes(xlCategory).CategoryNames = Range("A1:Z1")




"BHatMJ" wrote:

> The labels are text strings so I need a way of changing CategoryNames (I
> think)?
>
> "Barb Reinhardt" wrote:
>
> > Can you set Label to Variant/Double?
> >
> > "BHatMJ" wrote:
> >
> > > I am trying to assign labels to the tickmarks on a chart in an Excel module.
> > > I have the following code:
> > >
> > > label = "all the same"
> > > For Each tick In chtObj.Chart.Axes(xlCategory).CategoryNames
> > > tick = label
> > > Next
> > >
> > > I am getting an error because of a type mismatch. It appears that
> > > chtObj.Chart.Axes(xlCategory).CategoryNames is typed as "Variant/Double".
> > >
> > > Can anyone help?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Axes(xlCategory) for a chart-sheet in 2007 Arkadiy Microsoft Excel Programming 2 21st Nov 2009 11:55 AM
setting ActiveChart.Axes(xlCategory).MinimumScale not working Teddy Microsoft Excel Programming 2 26th Apr 2009 09:57 PM
Axes(xlCategory).TickLabels problem deko Microsoft Excel Programming 1 6th Mar 2005 02:34 AM
xlCategory Scale incjourn Microsoft Excel Charting 1 16th Mar 2004 07:57 PM
stacked column on primary axes, line on secondary axes - possible? Michelle Microsoft Powerpoint 0 9th Jul 2003 04:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:16 PM.