Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2. On the Tools menu, point to Macro, and then click Visual Basic Editor.
4. Copy the Visual Basic for Applications code below into the module sheet.
4. Copy the Visual Basic for Applications code below into the module sheet.
NOTE: If the Developer Ribbon is not showing go to Excel Options and enable it. In
Excel 2007 you will find it in the Popular menu and in Excel 2010 you will find it in the
Customize Ribbon menu.
Sub CalendarMaker()
' Create Entry cells, format them centered, wrap text, and bo
rder
' around days.
For x = 0 To 5
Range("A4").Offset(x * 2, 0).EntireRow.Insert
With Range("A4:G4").Offset(x * 2, 0)
.RowHeight = 65
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlTop
.WrapText = True
.Font.Size = 10
.Font.Bold = False
' Unlock these cells to be able to enter text later a
fter
' sheet is protected.
.Locked = False
End With
' Put border around the block of dates.
With Range("A3").Offset(x * 2, 0).Resize(2, _
7).Borders(xlLeft)
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Applies to
Microsoft Office Excel 2003, Microsoft Office Excel 2007, Microsoft Excel 2010, Excel
2016
Keywords: