Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Axes(xlCategory).CategoryNames

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Axes(xlCategory).CategoryNames

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Axes(xlCategory).CategoryNames

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Axes(xlCategory).CategoryNames


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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjusting the y axes on 2-axes line graphs aqua Charts and Charting in Excel 2 March 3rd 07 04:28 PM
Run-time error '1004': Unable to set the CategoryNames property of the Axis class bodani Excel Programming 0 June 30th 06 04:14 PM
Run-time error '1004': Unable to set the CategoryNames property of the Axis class bodani Excel Programming 0 June 30th 06 04:14 PM
Run-time error '1004': Unable to set the CategoryNames property of the Axis class bodani Excel Programming 0 June 30th 06 04:14 PM
Axes(xlCategory).TickLabels problem deko[_2_] Excel Programming 1 March 6th 05 02:34 AM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"