Results 1 to 4 of 4
  1. #1
    Stefan Moser is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2014
    Location
    Bavaria / Germany
    Posts
    18

    Access 2013 Chart Diagram Modification with VBA

    Dear all
    I would like to do two things

    1.) pink arrow // I've changed the titel in a diagram with vba ... is there also a methode to move the position of the titel with vba ( left-center or rigth ? )

    Private Sub Form_Current()


    ' KostenHinweis im Diagram
    Me!Dia_WS.Object.ChartTitle.Text = _
    "Preis: " & Me.[Roh-Preis] & "€/kg " & _
    " Mindestbestand =" & Round(Me.MindestBestand * Me.[Roh-Preis], 0) & "€ ; " & _
    " Maximalbestand =" & Round(Me.MindestBestand_Max * Me.[Roh-Preis], 0) & "€"
    'Me!Dia_WS.Object.ChartTitle.Left ???
    End Sub

    2.) red arrow // maybe its because of the titel placement but ...
    I would like to change the size of a diagram with VBA code to have the diagram fit nicely to a given space
    best thing would be if there would be a possibility to resize the diagram in the given space
    // Thanks Stefan


    Click image for larger version. 

Name:	Aufnahme1.jpg 
Views:	12 
Size:	168.9 KB 
ID:	18417

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I've built code to manipulate graphs in Access but never tried to position title nor resize graph. How is the 'given space' determined?

    I don't know why the title isn't automatically centered. Resizing a graph causes all kinds of issues - one of which is it affects font size.

    This is one complicated chart. Never seen anything like this. I deal with graph issues best when I can work with data. If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Stefan Moser is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2014
    Location
    Bavaria / Germany
    Posts
    18
    Yes your right its best to work with data ...
    unfortunately the data is calculated each time on demand so it's tricky to send data (because the related stuff is confidential and I really can’t ( Code of conduct ...)
    à But it isn’t the diagram, that works perfect it's just because like you mentioned while playing with the size all kind of funny things happen to text size ,general appearance , scaling ...
    Sometimes it’s not even possible to save and return back to normal draft view for diagram draft view
    So I was looking for a list of object and the way to manipulate those elements with VBA Code
    Like you could easy find it for Excel Chart.GetChartElement Method (Excel ) but not for Access

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I don't have an all-encompassing reference for VBA to code graphs, just what I can mine from the web. Good luck hunting.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. ms access 97 forms modification
    By jloyzaga in forum Access
    Replies: 3
    Last Post: 01-17-2014, 09:00 AM
  2. Outlook 2013 + Access 2013 + HTML
    By Yann63 in forum Programming
    Replies: 2
    Last Post: 11-26-2013, 02:39 PM
  3. Replies: 1
    Last Post: 08-17-2012, 04:50 PM
  4. Replies: 1
    Last Post: 11-09-2011, 12:08 PM
  5. Access total UI modification
    By Overdive in forum Access
    Replies: 5
    Last Post: 10-25-2009, 05:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums