Zack Barresse
05-19-2004, 04:31 PM
want to create a checkers board in excel? well now you can! put the following code into a standard module and call from any blank sheet.
Sub createCheckers()
Rows("1:8").Select
Selection.RowHeight = 45
ActiveWindow.Zoom = 100
Range("A1:G8").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=(MOD(COLUMN()+ROW(),2))=0"
Selection.FormatConditions(1).Interior.ColorIndex = 56
Selection.Interior.ColorIndex = 3
ActiveWorkbook.DisplayDrawingObjects = xlHide
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.ShowStartupDialog = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
End With
Range("A1").Select
End Sub
playing pieces coming soon!
Sub createCheckers()
Rows("1:8").Select
Selection.RowHeight = 45
ActiveWindow.Zoom = 100
Range("A1:G8").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=(MOD(COLUMN()+ROW(),2))=0"
Selection.FormatConditions(1).Interior.ColorIndex = 56
Selection.Interior.ColorIndex = 3
ActiveWorkbook.DisplayDrawingObjects = xlHide
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.ShowStartupDialog = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
End With
Range("A1").Select
End Sub
playing pieces coming soon!