Results 1 to 1 of 1

Thread: [Access] Controlling an unbound Excel Graph object

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2007
    Posts
    32

    [Access] Controlling an unbound Excel Graph object

    I am trying to plot a graph where the x value is based on the year and y is on production values. All the graphs in the serises will have different timelines. What I want to do now is to place a vertical line that I can control on the graph. See figure 1. The problem is I can't seam to figure out how to move this line in the Detail_format sub. Below is the code that I have tried but it still doesn't work:

    code Code:
    1. Dim objgraph As Object
    2. Dim objaxis As Object
    3. Dim objline As Object
    4. Set objgraph = Me![Graph1]
    5. Set objaxis = objgraph.Axes(1)
    6. objline = objgraph.Shapes("line 1") 'gives me an error here.  This is what I would like to change.
    7. objline.Left = 5 'never moves to this point
    8. With objaxis
    9.     t = (varLastDate - varFirstDate) / 365 - (newd - firstoyear) / 365
    10.     .MinimumScale = 0
    11.     t = (varLastDate - varFirstDate) / 365
    12.     .MaximumScale = t
    13.     leftr = .Left
    14.     righter = .Width
    15. End With

    Note: I have also tried just drawing a line on the report itself and properly moving it from left to right. The problem is the Excel graph appears to be in some units different then twips. Also, the zoom feature seams to be screwing up the graph.
    Attached Images Attached Images  

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