Change the range color in selection change event : Worksheet Event « Excel « VBA / Excel / Access / Word

VBA / Excel / Access / Word
1. Access
2. Application
3. Data Type
4. Data Type Functions
5. Date Functions
6. Excel
7. File Path
8. Forms
9. Language Basics
10. Math Functions
11. Outlook
12. PowerPoint
13. String Functions
14. Windows API
15. Word
16. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
VBA / Excel / Access / Word » Excel » Worksheet Event 
Change the range color in selection change event
 

         Sub Worksheet_SelectionChange(ByVal Target As Range)
             Rows.Interior.ColorIndex = xlColorIndexNone
             Target.EntireColumn.Interior.ColorIndex = 36
             Target.EntireRow.Interior.ColorIndex = 36
         End Sub

 
Related examples in the same category
1. Worksheet_SelectionChange(ByVal Target As Range)
2. With each range selection you make in the worksheet, the background color of the selection will turn blue.
3. Creating a Database Form From an Excel Worksheet in worksheet activate event
4. Cancel a change in Worksheet Selection Change event
5. If you want the same data to appear on other sheets but not in the same cell addresses
6. Activating Only the Used Range
7. Create a function for Excel: Is a cell formula cell
8. BeforeDoubleClick event
9. BeforeRightClick event
10. The Change event
11. Preventing data validation from being destroyed
12. changes a cell's interior color to red when it is double-clicked:
13. Worksheet_Calculate()
14. makes use of conditional formatting and overwrites any existing conditional formatting on the sheet.
15. Use a Change event to take what is in the cell and insert the colon for you
16. To validate user input, one possible location for the code is the SheetChange() event procedure of the Workbook object.
17. Use Event Parameters to cancel an event
18. disable the events and then reenable them at the end of the procedure:
19. Track worksheet change event
20. trace worksheet activate event
21. Worksheet Change Events
22. Monitoring a specific range for changes
23. checks each changed cell and displays a message box if the cell is within the desired range.
24. Validating data entry in Worksheet change event
25. SelectionChange event executes whenever the user makes a new selection on the worksheet.
26. The event-handler procedure for the SelectionChange event
27. Using the Change Event to Respond to Worksheet Changes
28. Examples of Activation Events
29. Example that activates cell A1 whenever the sheet is activated:
30. Some Worksheet event are executed before the associated event occurs and have a Cancel parameter that is passed by reference.
31. Enable Events
32. event procedure runs every time the worksheet recalculates
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.