About Us
Next
Home
Training
Products
Services
Online Store
Employment Opportunities
Contact Us
Leader in the Application of Excel
Free Trials
Demonstrations
Engineering Resources
Community & Media
Tidbits
My SpreadsheetWorld
November 26, 2007 - VBA and Excel Workbook Colors

Each Excel Workbook has a Colors Collection. The collection is a fixed size set at 56. The Interior Object, which is a subsystem of a Range Object has a Color Index Property, which ranges from 1 to 56. The color that is associated with this property can be visualized via Menus at Tools/Options/Color as follows:

 


The colors in this collection can be changed on the Excel side by clicking on the Modify... button and changing the color of a selected color, or in VBA it can be changed by using the RGB function to write to the Color property of the selected member of the collection as follows:



Each of these 4 sub procedures can be assigned to a button of the worksheet and tested as follows:

Give it a try to sharpen up your VBA skills.

Also, please consider taking a week off and joining me in the 13th Annual Tahoe Workshop, which is scheduled for January 21-25, 2008. This year, we will be offering both Spreadsheet Aided Engineering, and Advanced Spreadsheet Aided Engineering for Alumni. In both workshops, there is a scheduled time during the day for skiing. Mornings for the alumni, and afternoons for those taking Spreadsheet Aided Engineering. Hope to see you there, and please pass this information on to others in your organization who wish to sharpen up their Excel/VBA skills and applications to engineering.

- Tom

Please address any questions to info@spreadsheetworld.com.

Toll Free: 866 285 9068   Phone: 818 804 5130   Fax: 818 907 9437
Ó Copyright 2000-2008 - SpreadsheetWorld Inc. - All Rights Reserved | Contact Us | Privacy Policy

Sign In

SpreadsheetWorld Inc.