CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    Québec (Canada)
    Posts
    210

    Object Microsoft Excel Chart

    I puted graph in my form1 "Microsoft Excel Chart" and I would like to change data in graph but I don't know what can I do that.

    I try with:
    Chart1.Worksheet("sheet1").Select
    Chart1.Activesheet.Cells(2, 3).value = 10
    or
    Chart1.sheet1....
    or
    Chart1. ??? but not succes because each time I recieved this error "method or data member not found"

    In the object I have one graph and one sheet. The graph was make with data in sheet1 and I will like to change data in Sheet1 but how?

    Who can help me?

    Thanks

    Redg


  2. #2
    Join Date
    Jan 2000
    Location
    CA
    Posts
    52

    Re: Object Microsoft Excel Chart

    the typical syntax to set a cell value would be

    Worksheets("Sheet1").cells(2,3).value = 10


    To refer to the chart, you could use

    Worksheets("Sheet1").ChartObjects("Chart1"). etc...

    Take a look at the Help that is available for the Chart Object in Microsoft Excel Visual Basic.

    I hope this helps...
    Good Luck


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured