Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Color  Every  Other  Row  in  an  Excel  Spreadsheet  

 Content of Color Every Other Row in an Excel Spreadsheet.vbs
MD5 Hash: DC2D44CC2E8792C8446EC9B812B2972C
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)

For i = 1 to 5
If i Mod 2 = 0 Then
Set objRange = objExcel.ActiveCell.EntireRow
objRange.Cells.Interior.ColorIndex = 37
Else
Set objRange = objExcel.ActiveCell.EntireRow
objRange.Cells.Interior.ColorIndex = 36
End If

objWorksheet.Cells(i,1) = i

intNewRow = objExcel.ActiveCell.Row + 1
strNewCell = "A" & intNewRow
objExcel.Range(strNewCell).Activate

Next



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a