Results 1 to 10 of 10

Thread: Excel line Style

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2011
    Posts
    26

    Excel line Style

    how to change the shape of the end of the line

    I would like to Cap type . Square, as here

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: Excel line Style

    is this an excel question or a vb.net question?

    if it's excel, try here:

    http://www.vbforums.com/forumdisplay.php?f=37

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2011
    Posts
    26

    Re: Excel line Style

    Quote Originally Posted by .paul. View Post
    is this an excel question or a vb.net question?

    if it's excel, try here:

    http://www.vbforums.com/forumdisplay.php?f=37
    if I posted in the vb.net section there will be a reason, not believe?

    This is the code for the dash style
    Code:
    .Format.Line.DashStyle = 1
    for CapStyle ?

    I searched and asked many people but nobody knows

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Excel line Style

    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2011
    Posts
    26

    Re: Excel line Style

    Quote Originally Posted by opus View Post
    thank you very much, but I speak of the line of a chart
    no free-hand

  6. #6
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Excel line Style

    Post #12 of this link addresses running macros to generate code and I use it quite a bit. Follow the steps and do the changes you want to a spreadsheet. The code that is generated will be very close but it is still VBA. From that point you can tweak it the way you need.

    http://www.vbforums.com/showthread.php?t=391665

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2011
    Posts
    26

    Re: Excel line Style

    Quote Originally Posted by TysonLPrice View Post
    Post #12 of this link addresses running macros to generate code and I use it quite a bit. Follow the steps and do the changes you want to a spreadsheet. The code that is generated will be very close but it is still VBA. From that point you can tweak it the way you need.

    http://www.vbforums.com/showthread.php?t=391665
    Thanks, I had already tried
    But Excel does not record the CapStyle only DashStyle

  8. #8
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Excel line Style

    I'm not sure what you are trying to do but I used Google and found this link. It talks about why you can't do it and then someone pops in with what they say works.

    I'm just guessing because I don't do much Excel formatting.

    http://www.excelforum.com/excel-char...x-y-chart.html

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Oct 2011
    Posts
    26

    Re: Excel line Style

    Quote Originally Posted by TysonLPrice View Post
    I'm not sure what you are trying to do but I used Google and found this link. It talks about why you can't do it and then someone pops in with what they say works.

    I'm just guessing because I don't do much Excel formatting.

    http://www.excelforum.com/excel-char...x-y-chart.html
    Thanks, I already read that solution, but it's not what I'm looking

    this solution creates problems if I use different versions of Excel, the code has no such problems

    In a standard Excel chart you can change the style of the end of the line (see picture)

    http://imageshack.us/photo/my-images/824/84309548.jpg/

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Oct 2011
    Posts
    26

    Re: Excel line Style

    Code:
    Format.Line.Weight = 3
    Format.Line.DashStyle = 1
    Format.Line....  CapStyle ???
    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