www.EXCELITEMS.com

May 30, 2009

VBA Macro Codes Examples Collection

Filed under: VBA Macro — ashishjain @ 7:00 pm

Visual Basic for Automation (Macros Collection)

Workbook

Worksheets

  1. Sort all sheets
  2. Remove blank worksheets from Current workbook
  3. Color all Sheet Tabs
  4. Remove color from all sheet tabs
  5. Protect all worksheets
  6. Remove Password (Unprotect) all worksheets
  7. Insert ‘n’ number of Blank Worksheets


Range

  1. Color a range based on its percentage value

Select

  1. Invert the Selection

Number


Rows/Columns

  1. Delete Blank Rows
  2. Remove Empty Columns

Text

  1. Change Case (Upper, Lower, Proper, Sentence and Toggle)
  2. Remove Extra Spaces (Left, Right, Both sides and from Inside)

Format

  1. Partly Background Color a Cell (Coloring only a portion of Cell)

Form

  1. Resize Form during Run-Time

Event Macro

  1. Example of Worksheet_Change Event Macro

Miscellaneous

  1. Access Internet Explorer (Search Engine Example)
  2. Change Image Location
  3. Copy Excel Worksheets to MS Word

 


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.