About the Book
Create Sample Ludo in seconds! Create a Macro Enabled Workbook in Excel. Open VB Editor (Developer tab-Visual Basic button). Open Code Editor of any Sheet. Copy & Paste given Code there. Return to Excel and Run the Macro CL. [For Data Safety please use this code in new file.]
Sub CL()
Dim I As Integer
Dim RNG As Range
Dim S As String
S = Me.Name
If Application.ActiveSheet.Name S Then
MsgBox "Since Macro is linked with " & S & ". So Activating " & S
Worksheets(S).Activate
End If
I = MsgBox("SHEET DATA will be deleted and modified!!! Continue?", vbYesNo, "WARNING!!!")
If I = 7 Then Exit Sub
Set RNG = Range("A1: P18")
RNG.EntireRow.Delete
Set RNG = Range("A1: P23")
RNG.ClearContents
Set RNG = Range("A1: Q77")
With RNG.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.149998474074526
.PatternTintAndShade = 0
End With
Set RNG = Range("B2: B7, C2: F2, C7: F7, G2: G7, D4: E5, C8, C9: G9")
With RNG.Interior
.Color = 5287936
.TintAndShade = 0
End With
Set RNG = Range("B11: B16, C11: F11, C16: F16, G11: G16, D13: E14, H15, I11: I15")
With RNG.Interior
.Color = 255
.TintAndShade = 0
End With
Set RNG = Range("K11: K16, L11: O11, L16: O16, P11: P16, M13: N14, O10, K9: O9")
With RNG.Interior
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.399975585192419
End With
Set RNG = Range("K2: K7, L2: O2, L7: O7, P2: P7, M4: N5, J3, I3: I7")
With RNG.Interior
.Color = 65535
.TintAndShade = 0
End With
Set RNG = Range("H9, I8, J9, I10")
With RNG.Interior
.Color = 8224125
.TintAndShade = 0
End With
Set RNG = Range("B2: P16")
RNG.Borders(xlDiagonalDown).LineStyle = xlNone
RNG.Borders(xlDiagonalUp).LineStyle = xlNone
Set RNG = Range("D4: E5, B8: G10, D13: E14, M13: N14, H2: J16, K8: P10, M4: N5")
With RNG.Borders
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Set RNG = Range("H8, J8, I9, H10, J10")
With RNG.Interior
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
End With
Set RNG = Range("H4, D10, J14, N8")
With RNG.Borders(xlDiagonalDown)
.LineStyle = xlContinuous
End With
With RNG.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
End With
Set RNG = Range("B2: P16")
RNG.RowHeight = 21
RNG.ColumnWidth = 11
RNG.BorderAround LineStyle: =xlContinuous
Set RNG = Range("A1: Q77")
With RNG.Font
.Name = "Calibri"
.Size = 14
End With
RNG.Font.Bold = True
RNG.Font.Underline = xlUnderlineStyleSingle
With RNG
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Set RNG = Range("B1: P1, C2: F2, C3: F3, C6: F6, C7: F7, L2: O2, L3: O3, L6: O6, L7: O7, C11: F11, C12: F12, C15: F15, C16: F16, L11: O11, L12: O12, L15: O15, L16: O16, H17: J17, K17: P17, D17: E17, F17: G17, D18: E18, F18: G18")
RNG.Merge
Set RNG = Range("A1, A17: A77, Q17")
RNG.RowHeight = 18
RNG.ColumnWidth = 8.43
Range("A17").Value = "[R ] Enter]"
Range("A18").Value = "RESET"
Range("B17").Value = "[7 ] Enter]"
Range("B18").Value = "PLAY"
Range("C17").Value = "[8 ] Enter]"
Range("C18").Value = "RESTART"
Range("D17").Value = "[9 ] Enter]"
Range("D18").Value = "MAN. DIE"
Range("F17").Value = "[0 ] Enter]"
Range("F18").Value = "AUTO. DIE"
Range("H17").Value = "Val 1-Val 2-Val 3 [Number ] Enter]"
Range("K17").Value = "Select Values & Move Piece [1 2 3 4 ] Enter] -- Dot [.] + Enter to Deselect"
Range("A17, B17: F17").Font.Bold = False
Range("A17, B17: F17").Font.Size = 10
Range("H17").Characters(19, 16).Font.Size = 10
Range("H17").Characters(19, 16).Font.Bold = False
Range("K17").Characters(27, 49).Font.Size = 10
Range("K17").Characters(27, 49).Font.Bold = False
Set RNG = Nothing
End Sub