vba office

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA in office 2007

VBA in office 2007

resolvedResolved · Low Priority · Version Standard

Nathan has attended:
Excel VBA Intro Intermediate course

VBA in office 2007

Hi Carlos

I'm thinking of upgrading to office 2007 from 2003, are you aware of any differences with the code/layout in the new office package?

Also, do you remember our conversation about counting coloured cells?

Thanks
Nathan

Count Cells according to Colours & VBA in Office 2007

Nathan

I have run the code I usually use in the course in 2007 and there have been no problems.

The Visual Basic Editor (VBE) hasn't had any major changes

As for the code to count coloued cells do the following:

1. Open the VBE and create a Module in either the document where the code is to run or in the Personal Macro Workbook.

2. Copy the following code into the module:
[b]
Public Function CountByColour(MyRange As Range, MyColorIndex As Integer, _
Optional OfText As Boolean = False) As Long

' This function return the number of cells in MyRange with

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

New Normal Worksheet

Do you want all your worksheets to confirm to a certain look? Then change the Defaults!!!
1. Press Shift+F11 to create a new worksheet
2. Press Ctrl+A to select (higlight) all cells, Press Ctrl+1, make any formatting changes then click OK.
3. Press F12 (Function 12 key) click in the Save As Type, drop down, then select Template (*.xlt)
4. Click in the Save in drop-down, then find the folder; c:_program files_microsoft office_office_start. (For the underscores shown use backslash)
Name your templete sheet.xlt, then press Enter.
Sheet.xlt is used when you insert a new worksheet (Shift+F11)

Note: These changes are permanent changes on your PC.

View all Excel hints and tips


Server loaded in 0.08 secs.