From: johnpotter94501 on 22 Nov 2009 20:49 i am a teacher and use excell for grades . Names on top assignments on the right side. i am trying to make cross hairs what ever cell i click into i will see a color line vertical and horsonal to help me make sure the right grades are entered. i have office 2007 pro. -- Mr. Coffee
From: Rick Rothstein on 22 Nov 2009 22:09 Does this SelectionChange event code do what you want... Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = 0 Union(Target.EntireColumn, Target.EntireRow).Interior.ColorIndex = 40 End Sub Change the ColorIndex value to suit your own personal tastes. -- Rick (MVP - Excel) "johnpotter94501" <johnpotter94501(a)discussions.microsoft.com> wrote in message news:2DB03840-CBCF-45FC-AD32-60A52F5460B7(a)microsoft.com... >i am a teacher and use excell for grades . Names on top assignments on the > right side. i am trying to make cross hairs what ever cell i click into i > will see a color line vertical and horsonal to help me make sure the right > grades are entered. i have office 2007 pro. > -- > Mr. Coffee
From: Rick Rothstein on 23 Nov 2009 02:48 It occurs to me that you may not know how to implement the code I gave you earlier. Right click the tab at the bottom of the worksheet where you want to create the cross hair indicator, select View Code from the popup menu that appears and then copy/paste the code I gave you earlier into the code window that appeared. -- Rick (MVP - Excel) "Rick Rothstein" <rick.newsNO.SPAM(a)NO.SPAMverizon.net> wrote in message news:OapeSq%23aKHA.544(a)TK2MSFTNGP05.phx.gbl... > Does this SelectionChange event code do what you want... > > Private Sub Worksheet_SelectionChange(ByVal Target As Range) > Cells.Interior.ColorIndex = 0 > Union(Target.EntireColumn, Target.EntireRow).Interior.ColorIndex = 40 > End Sub > > Change the ColorIndex value to suit your own personal tastes. > > -- > Rick (MVP - Excel) > > > "johnpotter94501" <johnpotter94501(a)discussions.microsoft.com> wrote in > message news:2DB03840-CBCF-45FC-AD32-60A52F5460B7(a)microsoft.com... >>i am a teacher and use excell for grades . Names on top assignments on the >> right side. i am trying to make cross hairs what ever cell i click into i >> will see a color line vertical and horsonal to help me make sure the >> right >> grades are entered. i have office 2007 pro. >> -- >> Mr. Coffee >
From: Max on 23 Nov 2009 08:45 Rick, Thanks for sharing your crosshair sub. Is there a way in which we can control that worksheet sub's activation/deactivation via say, another sub assigned to a button? This is meant to enable "normal" mode (ie with crosshair sub deactivated) so that we can work on the sheet as per normal, with undo available, and switch-over to activate the crosshair sub whenever required. Thanks
From: Rick Rothstein on 23 Nov 2009 10:03 Here is one way to do that. Replace the code I posted earlier with the all the code I have marked below instead. To activate/deactivate the crosshair mode, just double click any cell on the worksheet... if the crosshair is visible, it will be turned off... if the crosshair is not visible, it will be turned on. '*************** START OF CODE *************** Dim CrosshairModeOn As Boolean Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Cancel = True CrosshairModeOn = Not CrosshairModeOn If CrosshairModeOn Then Union(Target.EntireColumn, Target.EntireRow).Interior.ColorIndex = 15 Else Cells.Interior.ColorIndex = 0 End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If CrosshairModeOn Then Cells.Interior.ColorIndex = 0 Union(Target.EntireColumn, Target.EntireRow).Interior.ColorIndex = 15 End If End Sub '*************** END OF CODE *************** -- Rick (MVP - Excel) "Max" <demechanik(a)yahoo.com> wrote in message news:ug4t9MEbKHA.5976(a)TK2MSFTNGP05.phx.gbl... > Rick, Thanks for sharing your crosshair sub. Is there a way in which we > can control that worksheet sub's activation/deactivation via say, another > sub assigned to a button? This is meant to enable "normal" mode (ie with > crosshair sub deactivated) so that we can work on the sheet as per normal, > with undo available, and switch-over to activate the crosshair sub > whenever required. Thanks > >
|
Next
|
Last
Pages: 1 2 Prev: Outlook 2007 crashes Next: Excel Renaming Files When Opening Using File Convertor |