View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
shakir sayed shakir sayed is offline
external usenet poster
 
Posts: 1
Default Category Names runtime error 1004

I am using the following code in 2 separate excel
spreadsheets. It works fine in the first but fails in the
second with the following error:

Code:

Set ch = Worksheets.("chart_out_sheet").ChartObjects(1)
ch.Chart.Axes(xlCategory).CategoryNames = _
Worksheets("data_sheet_name").Range("A1:A229")

Error:

Runtime Error 1004 - Unable to set CategoryNames for Axis
class

Has anyone got experience of this and is there an
explanation or workaround?