+ Reply to Thread
Results 1 to 19 of 19

Re: Error 1004 when programming DataLabels.Position

  1. #1
    FSt1
    Guest

    Re: Error 1004 when programming DataLabels.Position

    hi
    not sure but the code you posted has this

    xlLOabelPositionAbove

    that is misspelled. should be xlLabelPositionAbove.
    did you know that?

    regards
    FSt1
    "hturk" wrote:

    > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    >
    > Dim se as Series
    > Dim pts as Points
    > Dim pt as Point
    >
    > Set se = ActiveChart.SeriesCollection(2)
    > se.HasDataLabels = True
    > Set pts =se.Points
    > For each pt in pts
    > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > here.
    > next pt
    >
    > Does anyone have an idea as to what I am doing wrong.
    >


  2. #2
    Tom Ogilvy
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Tje obvious answer is that you have two words misspelled.

    pt.datalabel.position = xlLabelPositionAbove

    --
    Regards,
    Tom Ogilvy

    "hturk" <[email protected]> wrote in message
    news:[email protected]...
    > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    >
    > Dim se as Series
    > Dim pts as Points
    > Dim pt as Point
    >
    > Set se = ActiveChart.SeriesCollection(2)
    > se.HasDataLabels = True
    > Set pts =se.Points
    > For each pt in pts
    > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > here.
    > next pt
    >
    > Does anyone have an idea as to what I am doing wrong.
    >




  3. #3
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    When I use this code that I get from Excel VBA 2002 I get an error 1004.

    Dim se as Series
    Dim pts as Points
    Dim pt as Point

    Set se = ActiveChart.SeriesCollection(2)
    se.HasDataLabels = True
    Set pts =se.Points
    For each pt in pts
    pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    here.
    next pt

    Does anyone have an idea as to what I am doing wrong.


  4. #4
    Alok
    Guest

    Re: Error 1004 when programming DataLabels.Position

    You are probably trying to specify the position for a column chart type. That
    constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
    for column chart type.

    Alok

    "hturk" wrote:

    > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    >
    > Dim se as Series
    > Dim pts as Points
    > Dim pt as Point
    >
    > Set se = ActiveChart.SeriesCollection(2)
    > se.HasDataLabels = True
    > Set pts =se.Points
    > For each pt in pts
    > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > here.
    > next pt
    >
    > Does anyone have an idea as to what I am doing wrong.
    >


  5. #5
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    You are correct. What would I need to do to position the datalabels above
    each point for the columns.

    Harry

    "Alok" wrote:

    > You are probably trying to specify the position for a column chart type. That
    > constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
    > for column chart type.
    >
    > Alok
    >
    > "hturk" wrote:
    >
    > > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    > >
    > > Dim se as Series
    > > Dim pts as Points
    > > Dim pt as Point
    > >
    > > Set se = ActiveChart.SeriesCollection(2)
    > > se.HasDataLabels = True
    > > Set pts =se.Points
    > > For each pt in pts
    > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > > here.
    > > next pt
    > >
    > > Does anyone have an idea as to what I am doing wrong.
    > >


  6. #6
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    I made a typo when posting this code. But my actual codes is correct.

    "Tom Ogilvy" wrote:

    > Tje obvious answer is that you have two words misspelled.
    >
    > pt.datalabel.position = xlLabelPositionAbove
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "hturk" <[email protected]> wrote in message
    > news:[email protected]...
    > > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    > >
    > > Dim se as Series
    > > Dim pts as Points
    > > Dim pt as Point
    > >
    > > Set se = ActiveChart.SeriesCollection(2)
    > > se.HasDataLabels = True
    > > Set pts =se.Points
    > > For each pt in pts
    > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > > here.
    > > next pt
    > >
    > > Does anyone have an idea as to what I am doing wrong.
    > >

    >
    >
    >


  7. #7
    Alok
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Harry

    Try the constant xlLabelPositionInsideEnd

    Alok

    "hturk" wrote:

    > You are correct. What would I need to do to position the datalabels above
    > each point for the columns.
    >
    > Harry
    >
    > "Alok" wrote:
    >
    > > You are probably trying to specify the position for a column chart type. That
    > > constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
    > > for column chart type.
    > >
    > > Alok
    > >
    > > "hturk" wrote:
    > >
    > > > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    > > >
    > > > Dim se as Series
    > > > Dim pts as Points
    > > > Dim pt as Point
    > > >
    > > > Set se = ActiveChart.SeriesCollection(2)
    > > > se.HasDataLabels = True
    > > > Set pts =se.Points
    > > > For each pt in pts
    > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > > > here.
    > > > next pt
    > > >
    > > > Does anyone have an idea as to what I am doing wrong.
    > > >


  8. #8
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Alok

    Thanks I will try tommorrow morning and I will let you know how it went.

    How can I found out which constants apply to which charts.

    Thank You Very Much
    Harry

    "Alok" wrote:

    > Harry
    >
    > Try the constant xlLabelPositionInsideEnd
    >
    > Alok
    >
    > "hturk" wrote:
    >
    > > You are correct. What would I need to do to position the datalabels above
    > > each point for the columns.
    > >
    > > Harry
    > >
    > > "Alok" wrote:
    > >
    > > > You are probably trying to specify the position for a column chart type. That
    > > > constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
    > > > for column chart type.
    > > >
    > > > Alok
    > > >
    > > > "hturk" wrote:
    > > >
    > > > > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    > > > >
    > > > > Dim se as Series
    > > > > Dim pts as Points
    > > > > Dim pt as Point
    > > > >
    > > > > Set se = ActiveChart.SeriesCollection(2)
    > > > > se.HasDataLabels = True
    > > > > Set pts =se.Points
    > > > > For each pt in pts
    > > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > > > > here.
    > > > > next pt
    > > > >
    > > > > Does anyone have an idea as to what I am doing wrong.
    > > > >


  9. #9
    Rob Bovey
    Guest

    Re: Error 1004 when programming DataLabels.Position

    "hturk" <[email protected]> wrote in message
    news:[email protected]...
    > How can I found out which constants apply to which charts.


    Hi Harry,

    Download and install my XY Chart Labeler utility from the web site below
    my signature. Once installed, open Excel, go into the Visual Basic Editor,
    locate the XYChartLabeler project in the Project Window and set the IsAddIn
    property of its ThisWorkbook object to False.

    The top table on the worksheet that you can now see back in the Excel
    user interface provides a complete list of which label position constants
    can be used with which chart types.

    --
    Rob Bovey, Excel MVP
    Application Professionals
    http://www.appspro.com/

    * Take your Excel development skills to the next level.
    * Professional Excel Development
    http://www.appspro.com/Books/Books.htm

    >
    > "Alok" wrote:
    >
    >> Harry
    >>
    >> Try the constant xlLabelPositionInsideEnd
    >>
    >> Alok
    >>
    >> "hturk" wrote:
    >>
    >> > You are correct. What would I need to do to position the datalabels
    >> > above
    >> > each point for the columns.
    >> >
    >> > Harry
    >> >
    >> > "Alok" wrote:
    >> >
    >> > > You are probably trying to specify the position for a column chart
    >> > > type. That
    >> > > constant (xlLabelPositionAbove) is valid for line graph but is not
    >> > > acceptable
    >> > > for column chart type.
    >> > >
    >> > > Alok
    >> > >
    >> > > "hturk" wrote:
    >> > >
    >> > > > When I use this code that I get from Excel VBA 2002 I get an error
    >> > > > 1004.
    >> > > >
    >> > > > Dim se as Series
    >> > > > Dim pts as Points
    >> > > > Dim pt as Point
    >> > > >
    >> > > > Set se = ActiveChart.SeriesCollection(2)
    >> > > > se.HasDataLabels = True
    >> > > > Set pts =se.Points
    >> > > > For each pt in pts
    >> > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004
    >> > > > happens
    >> > > > here.
    >> > > > next pt
    >> > > >
    >> > > > Does anyone have an idea as to what I am doing wrong.
    >> > > >




  10. #10
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Rob

    Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    see the labels that are associated with each chart. Is the utility specific
    to a single workbook or all workbooks that I open. The reason for the
    question is that I create charts and pivot tables from an Access Database
    through VBA automation code and I noticed that the Utility is not available
    when excel is opened from within Access.

    "Rob Bovey" wrote:

    > "hturk" <[email protected]> wrote in message
    > news:[email protected]...
    > > How can I found out which constants apply to which charts.

    >
    > Hi Harry,
    >
    > Download and install my XY Chart Labeler utility from the web site below
    > my signature. Once installed, open Excel, go into the Visual Basic Editor,
    > locate the XYChartLabeler project in the Project Window and set the IsAddIn
    > property of its ThisWorkbook object to False.
    >
    > The top table on the worksheet that you can now see back in the Excel
    > user interface provides a complete list of which label position constants
    > can be used with which chart types.
    >
    > --
    > Rob Bovey, Excel MVP
    > Application Professionals
    > http://www.appspro.com/
    >
    > * Take your Excel development skills to the next level.
    > * Professional Excel Development
    > http://www.appspro.com/Books/Books.htm
    >
    > >
    > > "Alok" wrote:
    > >
    > >> Harry
    > >>
    > >> Try the constant xlLabelPositionInsideEnd
    > >>
    > >> Alok
    > >>
    > >> "hturk" wrote:
    > >>
    > >> > You are correct. What would I need to do to position the datalabels
    > >> > above
    > >> > each point for the columns.
    > >> >
    > >> > Harry
    > >> >
    > >> > "Alok" wrote:
    > >> >
    > >> > > You are probably trying to specify the position for a column chart
    > >> > > type. That
    > >> > > constant (xlLabelPositionAbove) is valid for line graph but is not
    > >> > > acceptable
    > >> > > for column chart type.
    > >> > >
    > >> > > Alok
    > >> > >
    > >> > > "hturk" wrote:
    > >> > >
    > >> > > > When I use this code that I get from Excel VBA 2002 I get an error
    > >> > > > 1004.
    > >> > > >
    > >> > > > Dim se as Series
    > >> > > > Dim pts as Points
    > >> > > > Dim pt as Point
    > >> > > >
    > >> > > > Set se = ActiveChart.SeriesCollection(2)
    > >> > > > se.HasDataLabels = True
    > >> > > > Set pts =se.Points
    > >> > > > For each pt in pts
    > >> > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004
    > >> > > > happens
    > >> > > > here.
    > >> > > > next pt
    > >> > > >
    > >> > > > Does anyone have an idea as to what I am doing wrong.
    > >> > > >

    >
    >
    >


  11. #11
    Rob Bovey
    Guest

    Re: Error 1004 when programming DataLabels.Position

    "hturk" <[email protected]> wrote in message
    news:[email protected]...
    > Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    > see the labels that are associated with each chart. Is the utility
    > specific
    > to a single workbook or all workbooks that I open. The reason for the
    > question is that I create charts and pivot tables from an Access Database
    > through VBA automation code and I noticed that the Utility is not
    > available
    > when excel is opened from within Access.


    Hi Harry,

    The chart labeler will operate on any workbook open in the same instance
    of Excel. You don't see it when you open Excel via automation because Excel
    doesn't load any add-ins when opened that way. You can load the chart
    labeler after you start Excel with:

    xlApp.AddIns("XY Chart Labeler 6.24").Installed = True

    Where xlApp is an object variable referencing the instance of the Excel
    application you've started via automation.

    There's no way to call the chart labeler from VBA in the current
    version, so you'll have to run it manually from the Excel UI. The chart
    labeler also only works on Excel charts. It can't label charts created using
    MSGraph.

    --
    Rob Bovey, Excel MVP
    Application Professionals
    http://www.appspro.com/

    * Take your Excel development skills to the next level.
    * Professional Excel Development
    http://www.appspro.com/Books/Books.htm



  12. #12
    Tom Ogilvy
    Guest

    Re: Error 1004 when programming DataLabels.Position

    when you open Excel using OLE Automation, addins are not loaded
    automatically as they would be if opened manually. You would need to load
    the addin explicitely in your code.

    --
    Regards,
    Tom Ogilvy

    "hturk" <[email protected]> wrote in message
    news:[email protected]...
    > Rob
    >
    > Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    > see the labels that are associated with each chart. Is the utility

    specific
    > to a single workbook or all workbooks that I open. The reason for the
    > question is that I create charts and pivot tables from an Access Database
    > through VBA automation code and I noticed that the Utility is not

    available
    > when excel is opened from within Access.
    >
    > "Rob Bovey" wrote:
    >
    > > "hturk" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > How can I found out which constants apply to which charts.

    > >
    > > Hi Harry,
    > >
    > > Download and install my XY Chart Labeler utility from the web site

    below
    > > my signature. Once installed, open Excel, go into the Visual Basic

    Editor,
    > > locate the XYChartLabeler project in the Project Window and set the

    IsAddIn
    > > property of its ThisWorkbook object to False.
    > >
    > > The top table on the worksheet that you can now see back in the

    Excel
    > > user interface provides a complete list of which label position

    constants
    > > can be used with which chart types.
    > >
    > > --
    > > Rob Bovey, Excel MVP
    > > Application Professionals
    > > http://www.appspro.com/
    > >
    > > * Take your Excel development skills to the next level.
    > > * Professional Excel Development
    > > http://www.appspro.com/Books/Books.htm
    > >
    > > >
    > > > "Alok" wrote:
    > > >
    > > >> Harry
    > > >>
    > > >> Try the constant xlLabelPositionInsideEnd
    > > >>
    > > >> Alok
    > > >>
    > > >> "hturk" wrote:
    > > >>
    > > >> > You are correct. What would I need to do to position the

    datalabels
    > > >> > above
    > > >> > each point for the columns.
    > > >> >
    > > >> > Harry
    > > >> >
    > > >> > "Alok" wrote:
    > > >> >
    > > >> > > You are probably trying to specify the position for a column

    chart
    > > >> > > type. That
    > > >> > > constant (xlLabelPositionAbove) is valid for line graph but is

    not
    > > >> > > acceptable
    > > >> > > for column chart type.
    > > >> > >
    > > >> > > Alok
    > > >> > >
    > > >> > > "hturk" wrote:
    > > >> > >
    > > >> > > > When I use this code that I get from Excel VBA 2002 I get an

    error
    > > >> > > > 1004.
    > > >> > > >
    > > >> > > > Dim se as Series
    > > >> > > > Dim pts as Points
    > > >> > > > Dim pt as Point
    > > >> > > >
    > > >> > > > Set se = ActiveChart.SeriesCollection(2)
    > > >> > > > se.HasDataLabels = True
    > > >> > > > Set pts =se.Points
    > > >> > > > For each pt in pts
    > > >> > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error

    1004
    > > >> > > > happens
    > > >> > > > here.
    > > >> > > > next pt
    > > >> > > >
    > > >> > > > Does anyone have an idea as to what I am doing wrong.
    > > >> > > >

    > >
    > >
    > >




  13. #13
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    It worked fine thank you very Much

    Harry

    "hturk" wrote:

    > Alok
    >
    > Thanks I will try tommorrow morning and I will let you know how it went.
    >
    > How can I found out which constants apply to which charts.
    >
    > Thank You Very Much
    > Harry
    >
    > "Alok" wrote:
    >
    > > Harry
    > >
    > > Try the constant xlLabelPositionInsideEnd
    > >
    > > Alok
    > >
    > > "hturk" wrote:
    > >
    > > > You are correct. What would I need to do to position the datalabels above
    > > > each point for the columns.
    > > >
    > > > Harry
    > > >
    > > > "Alok" wrote:
    > > >
    > > > > You are probably trying to specify the position for a column chart type. That
    > > > > constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
    > > > > for column chart type.
    > > > >
    > > > > Alok
    > > > >
    > > > > "hturk" wrote:
    > > > >
    > > > > > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    > > > > >
    > > > > > Dim se as Series
    > > > > > Dim pts as Points
    > > > > > Dim pt as Point
    > > > > >
    > > > > > Set se = ActiveChart.SeriesCollection(2)
    > > > > > se.HasDataLabels = True
    > > > > > Set pts =se.Points
    > > > > > For each pt in pts
    > > > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > > > > > here.
    > > > > > next pt
    > > > > >
    > > > > > Does anyone have an idea as to what I am doing wrong.
    > > > > >


  14. #14
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Thank You very Much Rob I will try the code on Monday when I get to work.
    I will let you know how it went.

    Harry


    "Rob Bovey" wrote:

    > "hturk" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    > > see the labels that are associated with each chart. Is the utility
    > > specific
    > > to a single workbook or all workbooks that I open. The reason for the
    > > question is that I create charts and pivot tables from an Access Database
    > > through VBA automation code and I noticed that the Utility is not
    > > available
    > > when excel is opened from within Access.

    >
    > Hi Harry,
    >
    > The chart labeler will operate on any workbook open in the same instance
    > of Excel. You don't see it when you open Excel via automation because Excel
    > doesn't load any add-ins when opened that way. You can load the chart
    > labeler after you start Excel with:
    >
    > xlApp.AddIns("XY Chart Labeler 6.24").Installed = True
    >
    > Where xlApp is an object variable referencing the instance of the Excel
    > application you've started via automation.
    >
    > There's no way to call the chart labeler from VBA in the current
    > version, so you'll have to run it manually from the Excel UI. The chart
    > labeler also only works on Excel charts. It can't label charts created using
    > MSGraph.
    >
    > --
    > Rob Bovey, Excel MVP
    > Application Professionals
    > http://www.appspro.com/
    >
    > * Take your Excel development skills to the next level.
    > * Professional Excel Development
    > http://www.appspro.com/Books/Books.htm
    >
    >
    >


  15. #15
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Thanks Tom

    I reaaly appreciate your help as well as everyone else who has helped me
    tremendously.

    "Tom Ogilvy" wrote:

    > when you open Excel using OLE Automation, addins are not loaded
    > automatically as they would be if opened manually. You would need to load
    > the addin explicitely in your code.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "hturk" <[email protected]> wrote in message
    > news:[email protected]...
    > > Rob
    > >
    > > Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    > > see the labels that are associated with each chart. Is the utility

    > specific
    > > to a single workbook or all workbooks that I open. The reason for the
    > > question is that I create charts and pivot tables from an Access Database
    > > through VBA automation code and I noticed that the Utility is not

    > available
    > > when excel is opened from within Access.
    > >
    > > "Rob Bovey" wrote:
    > >
    > > > "hturk" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > How can I found out which constants apply to which charts.
    > > >
    > > > Hi Harry,
    > > >
    > > > Download and install my XY Chart Labeler utility from the web site

    > below
    > > > my signature. Once installed, open Excel, go into the Visual Basic

    > Editor,
    > > > locate the XYChartLabeler project in the Project Window and set the

    > IsAddIn
    > > > property of its ThisWorkbook object to False.
    > > >
    > > > The top table on the worksheet that you can now see back in the

    > Excel
    > > > user interface provides a complete list of which label position

    > constants
    > > > can be used with which chart types.
    > > >
    > > > --
    > > > Rob Bovey, Excel MVP
    > > > Application Professionals
    > > > http://www.appspro.com/
    > > >
    > > > * Take your Excel development skills to the next level.
    > > > * Professional Excel Development
    > > > http://www.appspro.com/Books/Books.htm
    > > >
    > > > >
    > > > > "Alok" wrote:
    > > > >
    > > > >> Harry
    > > > >>
    > > > >> Try the constant xlLabelPositionInsideEnd
    > > > >>
    > > > >> Alok
    > > > >>
    > > > >> "hturk" wrote:
    > > > >>
    > > > >> > You are correct. What would I need to do to position the

    > datalabels
    > > > >> > above
    > > > >> > each point for the columns.
    > > > >> >
    > > > >> > Harry
    > > > >> >
    > > > >> > "Alok" wrote:
    > > > >> >
    > > > >> > > You are probably trying to specify the position for a column

    > chart
    > > > >> > > type. That
    > > > >> > > constant (xlLabelPositionAbove) is valid for line graph but is

    > not
    > > > >> > > acceptable
    > > > >> > > for column chart type.
    > > > >> > >
    > > > >> > > Alok
    > > > >> > >
    > > > >> > > "hturk" wrote:
    > > > >> > >
    > > > >> > > > When I use this code that I get from Excel VBA 2002 I get an

    > error
    > > > >> > > > 1004.
    > > > >> > > >
    > > > >> > > > Dim se as Series
    > > > >> > > > Dim pts as Points
    > > > >> > > > Dim pt as Point
    > > > >> > > >
    > > > >> > > > Set se = ActiveChart.SeriesCollection(2)
    > > > >> > > > se.HasDataLabels = True
    > > > >> > > > Set pts =se.Points
    > > > >> > > > For each pt in pts
    > > > >> > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error

    > 1004
    > > > >> > > > happens
    > > > >> > > > here.
    > > > >> > > > next pt
    > > > >> > > >
    > > > >> > > > Does anyone have an idea as to what I am doing wrong.
    > > > >> > > >
    > > >
    > > >
    > > >

    >
    >
    >


  16. #16
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Once again thank you so much for the tremendous help.

    Harry

    "Rob Bovey" wrote:

    > "hturk" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    > > see the labels that are associated with each chart. Is the utility
    > > specific
    > > to a single workbook or all workbooks that I open. The reason for the
    > > question is that I create charts and pivot tables from an Access Database
    > > through VBA automation code and I noticed that the Utility is not
    > > available
    > > when excel is opened from within Access.

    >
    > Hi Harry,
    >
    > The chart labeler will operate on any workbook open in the same instance
    > of Excel. You don't see it when you open Excel via automation because Excel
    > doesn't load any add-ins when opened that way. You can load the chart
    > labeler after you start Excel with:
    >
    > xlApp.AddIns("XY Chart Labeler 6.24").Installed = True
    >
    > Where xlApp is an object variable referencing the instance of the Excel
    > application you've started via automation.
    >
    > There's no way to call the chart labeler from VBA in the current
    > version, so you'll have to run it manually from the Excel UI. The chart
    > labeler also only works on Excel charts. It can't label charts created using
    > MSGraph.
    >
    > --
    > Rob Bovey, Excel MVP
    > Application Professionals
    > http://www.appspro.com/
    >
    > * Take your Excel development skills to the next level.
    > * Professional Excel Development
    > http://www.appspro.com/Books/Books.htm
    >
    >
    >


  17. #17
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Rob I did not realize that you are one of the authors of a book I purchased a
    couple of months ago. Professional Excel Development is a great book and I
    learned alot. Thank you for a great book.

    Harry

    "Rob Bovey" wrote:

    > "hturk" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank You very much. I loaded the XY Chart Labeler Utility and I can now
    > > see the labels that are associated with each chart. Is the utility
    > > specific
    > > to a single workbook or all workbooks that I open. The reason for the
    > > question is that I create charts and pivot tables from an Access Database
    > > through VBA automation code and I noticed that the Utility is not
    > > available
    > > when excel is opened from within Access.

    >
    > Hi Harry,
    >
    > The chart labeler will operate on any workbook open in the same instance
    > of Excel. You don't see it when you open Excel via automation because Excel
    > doesn't load any add-ins when opened that way. You can load the chart
    > labeler after you start Excel with:
    >
    > xlApp.AddIns("XY Chart Labeler 6.24").Installed = True
    >
    > Where xlApp is an object variable referencing the instance of the Excel
    > application you've started via automation.
    >
    > There's no way to call the chart labeler from VBA in the current
    > version, so you'll have to run it manually from the Excel UI. The chart
    > labeler also only works on Excel charts. It can't label charts created using
    > MSGraph.
    >
    > --
    > Rob Bovey, Excel MVP
    > Application Professionals
    > http://www.appspro.com/
    >
    > * Take your Excel development skills to the next level.
    > * Professional Excel Development
    > http://www.appspro.com/Books/Books.htm
    >
    >
    >


  18. #18
    hturk
    Guest

    Re: Error 1004 when programming DataLabels.Position

    Once again thank you very much for the tremendous help

    Harry

    "hturk" wrote:

    > Alok
    >
    > Thanks I will try tommorrow morning and I will let you know how it went.
    >
    > How can I found out which constants apply to which charts.
    >
    > Thank You Very Much
    > Harry
    >
    > "Alok" wrote:
    >
    > > Harry
    > >
    > > Try the constant xlLabelPositionInsideEnd
    > >
    > > Alok
    > >
    > > "hturk" wrote:
    > >
    > > > You are correct. What would I need to do to position the datalabels above
    > > > each point for the columns.
    > > >
    > > > Harry
    > > >
    > > > "Alok" wrote:
    > > >
    > > > > You are probably trying to specify the position for a column chart type. That
    > > > > constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
    > > > > for column chart type.
    > > > >
    > > > > Alok
    > > > >
    > > > > "hturk" wrote:
    > > > >
    > > > > > When I use this code that I get from Excel VBA 2002 I get an error 1004.
    > > > > >
    > > > > > Dim se as Series
    > > > > > Dim pts as Points
    > > > > > Dim pt as Point
    > > > > >
    > > > > > Set se = ActiveChart.SeriesCollection(2)
    > > > > > se.HasDataLabels = True
    > > > > > Set pts =se.Points
    > > > > > For each pt in pts
    > > > > > pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
    > > > > > here.
    > > > > > next pt
    > > > > >
    > > > > > Does anyone have an idea as to what I am doing wrong.
    > > > > >


  19. #19
    Rob Bovey
    Guest

    Re: Error 1004 when programming DataLabels.Position

    "hturk" <[email protected]> wrote in message
    news:[email protected]...
    > Rob I did not realize that you are one of the authors of a book I
    > purchased a
    > couple of months ago. Professional Excel Development is a great book and
    > I
    > learned alot. Thank you for a great book.


    Hi Harry,

    Glad you liked it, thanks for letting me know.

    --
    Rob Bovey, Excel MVP
    Application Professionals
    http://www.appspro.com/

    * Take your Excel development skills to the next level.
    * Professional Excel Development
    http://www.appspro.com/Books/Books.htm




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1