Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Create or change color of a (line with arrow head) with a Macro en

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed - 19 Jan 2006 16:18 GMT
Hi
Can an item (a line with arrowhead as created by the Drawing function for
example)  be created and/or the color of it changed by  an entry or entries
in a Macro when certain conditions exist?
If this can be done, how is it done?
Thankyou
Ed
Tim Williams - 19 Jan 2006 17:24 GMT
With ActiveSheet.Shapes.AddLine(240#, 190.5, 432#, 191.25)
     .Line.EndArrowheadStyle = msoArrowheadTriangle
     .Line.EndArrowheadLength = msoArrowheadLengthMedium
     .Line.EndArrowheadWidth = msoArrowheadWidthMedium
     .Name = "myLine"
End With

With ActiveSheet.Shapes("myLine")
   .Line.ForeColor.RGB = RGB(255, 0, 0)
End With

Tim

Signature

Tim Williams
Palo Alto, CA

> Hi
> Can an item (a line with arrowhead as created by the Drawing function for
[quoted text clipped - 3 lines]
> Thankyou
> Ed
Ed - 19 Jan 2006 19:33 GMT
Hi Tim
Thanks for the good information.  My test Macro tells me I am on the right
track.
I looked for further help on this area of programming in the "Excel Help" on
my computer.  I could not find any.  Where can I find more information on
this area of programming (such as the line appears properly, but is protected
and can't be removed or replaced with the Macro. Also, information on the
placement of the line and colors.)
I think I need an advanced  programming handbook.
Is this information available on the internet?
Or where is one available?
Thanks again
Ed

> With ActiveSheet.Shapes.AddLine(240#, 190.5, 432#, 191.25)
>       .Line.EndArrowheadStyle = msoArrowheadTriangle
[quoted text clipped - 17 lines]
> > Thankyou
> > Ed
Tim Williams - 19 Jan 2006 23:04 GMT
Did you look in help from Excel or from the VB editor ?

I don't know why the line would be protected.  Maybe you could show the code
you have so far ?

Lots of VBA help available on the web (searhc Google and you'll find plenty
of tutorials) or in this newsgroup.

Tim

Signature

Tim Williams
Palo Alto, CA

> Hi Tim
> Thanks for the good information.  My test Macro tells me I am on the right
[quoted text clipped - 32 lines]
> > > Thankyou
> > > Ed
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.