+ Reply to Thread
Results 1 to 8 of 8

VBA autoshape arrows to show performance

  1. #1
    Registered User
    Join Date
    04-17-2008
    Location
    Yorkshire
    Posts
    79

    VBA autoshape arrows to show performance

    Morning all. I'm trying to use VBA to generate autoshape arrows to track changes in values.

    Something allong the lines of Column B (Jans data) C (Febs Data) E (autoshape arrow, green up, for improvement, or red downwards for a worsening).

    The problem I'm having is postioning my autoshapes. The only way I can do it at present is to keep all columns and rows a standard width, and position using multiples of those.

    Is there anyway to set the autoshape to the cell height and width, and position it within the boundries of the cell? This way I don't have to worry about rewiting my code every time I change a cell width?
    Last edited by mikeyfear; 10-02-2008 at 08:01 AM.
    -----------------------------------------------
    Trying to give and take in equal measure!
    Self professed excel bodger!
    -----------------------------------------------

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Which version of Excel are you using?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485
    The cell has properties you can use to size you shape.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    04-17-2008
    Location
    Yorkshire
    Posts
    79
    I'm on excel 2003.

    I'm using those values to position the autoshapes at the moment, but if I change the width of a cell I have to manuallly move the "Left" value, and likewise with the height values for row heigh changes.

    I was thinking I could do a sum of the heights of all the previous cells (and the same for the width), but it seems a clumbersome way of doing it, and hoped there might be a simple way to get the top left position of a cell?

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485
    post an example workbook with your code.

    include an example of how the arrow should look

  6. #6
    Registered User
    Join Date
    04-17-2008
    Location
    Yorkshire
    Posts
    79
    Please Login or Register  to view this content.
    I've done a simplified snippet, (refers attached example). The problem is I want the left and top positions determined by the position of F13 and F14 etc not just manually typed.
    Attached Files Attached Files

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485
    Here is the code
    Please Login or Register  to view this content.
    See attached, which also includes a formula approach and custom number format
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-17-2008
    Location
    Yorkshire
    Posts
    79
    Many thanks Andy.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Show Data Lables show Amount & Persentage at the same time
    By ComcoDG in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-29-2008, 04:54 AM
  2. Cell Dependency
    By pstritt in forum Excel General
    Replies: 1
    Last Post: 11-08-2007, 05:02 PM
  3. making show + numbers only
    By Crasher in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2007, 09:27 AM
  4. Hide Autoshape
    By edwardpestian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2007, 06:01 AM
  5. Assignment overDUE PLEASE PLEASE HELP!!
    By undergrad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2006, 12:34 AM

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