PC Review


Reply
Thread Tools Rate Thread

change line colors on multiple sheets.

 
 
Farooq Sheri
Guest
Posts: n/a
 
      15th Mar 2009
Is it possible to change line color by clicking on the it i.e. if I click on
a line its color should change to, say, red. Furthermore, is it possible to
click a line on one sheet and have some other line on another sheet to be
selected (as part of a group).

Thanks.
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      15th Mar 2009
Hi

Paste this event code into the codesheet for the desired sheet. This will
change row color for the selected cell to red in the desired sheet and in
sheet3.

Dim PreviousRow As Integer
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If PreviousRow <> 0 Then
Rows(PreviousRow).Interior.ColorIndex = xlNone
Sheets("Sheet3").Rows(PreviousRow).Interior.ColorIndex = xlNone
End If
PreviousRow = Target.Row
Target.EntireRow.Interior.ColorIndex = 3
Sheets("Sheet3").Rows(Target.Row).Interior.ColorIndex = 3
End Sub

Hopes this helps

----
Per

"Farooq Sheri" <(E-Mail Removed)> skrev i meddelelsen
news:B513DCEA-2893-4472-B302-(E-Mail Removed)...
> Is it possible to change line color by clicking on the it i.e. if I click
> on
> a line its color should change to, say, red. Furthermore, is it possible
> to
> click a line on one sheet and have some other line on another sheet to be
> selected (as part of a group).
>
> Thanks.


 
Reply With Quote
 
Farooq Sheri
Guest
Posts: n/a
 
      15th Mar 2009
Hi Jessen

I want to change color of line / select another line (drawn by using the
drawign tool). Your answer is about a cell. Can this be done for a line?

"Per Jessen" wrote:

> Hi
>
> Paste this event code into the codesheet for the desired sheet. This will
> change row color for the selected cell to red in the desired sheet and in
> sheet3.
>
> Dim PreviousRow As Integer
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If PreviousRow <> 0 Then
> Rows(PreviousRow).Interior.ColorIndex = xlNone
> Sheets("Sheet3").Rows(PreviousRow).Interior.ColorIndex = xlNone
> End If
> PreviousRow = Target.Row
> Target.EntireRow.Interior.ColorIndex = 3
> Sheets("Sheet3").Rows(Target.Row).Interior.ColorIndex = 3
> End Sub
>
> Hopes this helps
>
> ----
> Per
>
> "Farooq Sheri" <(E-Mail Removed)> skrev i meddelelsen
> news:B513DCEA-2893-4472-B302-(E-Mail Removed)...
> > Is it possible to change line color by clicking on the it i.e. if I click
> > on
> > a line its color should change to, say, red. Furthermore, is it possible
> > to
> > click a line on one sheet and have some other line on another sheet to be
> > selected (as part of a group).
> >
> > Thanks.

>
>

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      15th Mar 2009
Dear Farooq

You can assign a macro and use the below code.

Set oShp = ActiveSheet.Shapes(1)
oShp.Line.ForeColor.SchemeColor = 2

If this post helps click Yes
---------------
Jacob Skaria

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Colors and/or Patterns in the Same Line billbrandi Microsoft Excel Charting 0 13th Jun 2009 02:43 AM
Varying colors on a line chart with multiple series LKP Microsoft Excel Charting 2 17th Sep 2008 03:23 PM
Combine multiple line item totals in multiple sheets onto one grand total sheet. =?Utf-8?B?TWF0dA==?= Microsoft Excel Worksheet Functions 0 21st Jan 2004 06:36 PM
Sectioning a single plotted line into multiple colors fish Microsoft Excel Charting 1 20th Nov 2003 12:19 AM
Change Graph Line Colors at Runtime? Ken Microsoft Dot NET Framework Forms 1 25th Sep 2003 09:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:25 AM.