Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem width width-property
Hi
I'd like to change a line (shapes-object). This works fine when line goes from up-left to down-right, but I'm not able to draw a line from up-right to down-left. In this case the width-property would be minus, but this is not a valid value. How to do? Tom |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem width width-property
1. You can delete the line and redraw it.
2. You can record a macro & change the line to see how Excel does it. I did it I couldn't figure it out. I think option 1 is easier. "Tom" wrote in message ... Hi I'd like to change a line (shapes-object). This works fine when line goes from up-left to down-right, but I'm not able to draw a line from up-right to down-left. In this case the width-property would be minus, but this is not a valid value. How to do? Tom |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem width width-property
I added 2 lines from the drawing toolbar on to a fresh worksheet. I could
manipulate the existing lines by going through the Lines collection or the Shapes collection. Maybe there's something in here that helps: Option Explicit Sub testme01() Dim myLine1 As Line Dim myLine2 As Shape Dim myLine3 As Shape Dim myLine4 As Line With ActiveSheet Set myLine1 = .Lines("Line 1") myLine1.ShapeRange.Flip msoFlipHorizontal Set myLine2 = .Shapes("line 2") myLine2.Flip msoFlipVertical With .Range("b3:c9") Set myLine3 = .Parent.Shapes.AddLine _ (beginx:=.Left, _ beginy:=.Top, _ endx:=.Left + .Width, _ endy:=.Top + .Height) 'myLine3.Flip msoFlipHorizontal myLine3.Name = "Line 3" End With With .Range("e3:g9") Set myLine4 = .Parent.Lines.Add _ (x1:=.Left, _ y1:=.Top, _ x2:=.Left + .Width, _ y2:=.Top + .Height) 'myLine4.Flip msoFlipHorizontal myLine4.Name = "Line 4" End With End With End Sub the Lines stuff is a hold over from xl95. They're a "hidden" element of xl97 and greater. You can still find info within the Object browser if you want. But I'd recommend that you use the shapes collection. You'll be able to get help out of VBA's help system. Tom wrote: Hi I'd like to change a line (shapes-object). This works fine when line goes from up-left to down-right, but I'm not able to draw a line from up-right to down-left. In this case the width-property would be minus, but this is not a valid value. How to do? Tom -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Cell Width WITHOUT changing Column width | Excel Discussion (Misc queries) | |||
Concvert Full Width Katakana characters into Half Width Katakana C | Excel Discussion (Misc queries) | |||
Data-Validation-List-Width of list must be colomn width, is this possible | Excel Worksheet Functions | |||
ASC() does not convert full-width to half-width letters (Exel 2003 | Excel Worksheet Functions | |||
How to make cell width different than the column width it lies in | Excel Discussion (Misc queries) |