Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default change line colors on multiple sheets.

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default change line colors on multiple sheets.

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.ColorI ndex = xlNone
End If
PreviousRow = Target.Row
Target.EntireRow.Interior.ColorIndex = 3
Sheets("Sheet3").Rows(Target.Row).Interior.ColorIn dex = 3
End Sub

Hopes this helps

----
Per

"Farooq Sheri" skrev i meddelelsen
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default change line colors on multiple sheets.

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.ColorI ndex = xlNone
End If
PreviousRow = Target.Row
Target.EntireRow.Interior.ColorIndex = 3
Sheets("Sheet3").Rows(Target.Row).Interior.ColorIn dex = 3
End Sub

Hopes this helps

----
Per

"Farooq Sheri" skrev i meddelelsen
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default change line colors on multiple sheets.

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Colors and/or Patterns in the Same Line billbrandi Charts and Charting in Excel 1 June 13th 09 07:50 AM
Varying colors on a line chart with multiple series LKP Charts and Charting in Excel 2 September 17th 08 03:23 PM
How do I change the default line colors in Excel graphs? graduate_matt Charts and Charting in Excel 2 May 16th 07 06:39 PM
Copyin multiple sheets data into one line Mary Thomas Excel Worksheet Functions 0 June 20th 06 06:53 PM
How do I use VBA to change line colors Dilbert00 Charts and Charting in Excel 2 June 4th 05 01:37 PM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"