Results 1 to 3 of 3

Thread: Getting error that "specified dimension is not valid for the current chart type" on Excel

  1. #1
    Join Date
    Jan 2012
    Posts
    17

    Getting error that "specified dimension is not valid for the current chart type" on Excel

    I have an XLAM (Add-in) which opens a workbook, works upon it and saves it with SaveAs in the same format as that of the original workbook opened. I get this error with message "The specified dimension is not valid for the current chart type" at randomly when the SaveAs operation is called. Any idea why am I getting this error at SaveAs as. I believe the error has got something to do with Charts/Graphs. Any information on this would be appreciated.

  2. #2
    Join Date
    Aug 2011
    Posts
    566

    Re: Getting error that "specified dimension is not valid for the current chart type" on Excel

    The problem occurs whenever the default chart type is set to other chart types than the ones you are trying to create. For an example, if you try to create line chart and if the default chart in Excel is OHLC (Candlestick Stock Chart) then Excel will be fast to complain "The specified dimension is not valid for the current chart type". The same occurs even if you try to create charts from VB.NET. Hence, first of all change the default chart type to some basic chart types like Line charts. The problem will be solved.

  3. #3
    Join Date
    Jul 2011
    Posts
    623

    Re: Getting error that "specified dimension is not valid for the current chart type" on Excel

    There are some reference code that I will notify you. I am not providing the entire code, if you are writing just check the references.
    Code:
    macro= ActiveSheet.Name 
    ActiveChart.SeriesCollection (1). Name = "= filename.xls! Time" & sheet
    
    This results in something like = filename.xls! table1
    
    But here you need a range, ie something like that: 
    
    ActiveChart.SeriesCollection (1) Name = Worksheets (macro) Range ("A1: A10").. 
    ActiveChart.SeriesCollection (1) Values ​​= Worksheets (macro) Range ("B1: B10")..

Similar Threads

  1. Replies: 3
    Last Post: 31-12-2013, 10:36 AM
  2. Replies: 5
    Last Post: 01-12-2010, 05:22 PM
  3. Replies: 6
    Last Post: 18-05-2010, 12:27 AM
  4. Replies: 5
    Last Post: 30-03-2010, 05:21 AM
  5. "Filename is not valid" Error in Microsoft Excel
    By warehouse peon in forum Windows Software
    Replies: 5
    Last Post: 10-03-2010, 03:12 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,546,378.76494 seconds with 17 queries