Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's perfect! Thanks Rick.
Rick Rothstein wrote: This should do it for you... Private Sub Worksheet_Change(ByVal Target As Range) Dim X As Long If Target.Address = "$A$1" And IsDate(Target.Value) Then Range("A2:A248").Clear If Day(Target.Value) = 1 Then For X = 1 To 8 * Day(DateAdd("m", 1, Range("A1").Text) - 1) Step 8 With Cells(X, "A") .Resize(8, 1).Value = Range("A1").Value + Int(X / 8) With .Offset(7).Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium End With End With Next End If End If End Sub You didn't say how thick to make the borders, so I guessed at "medium" (see the .Weight statement). You can change that if you want; your choices are xlHairline, xlThin, xlMedium or xlThick. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using date as trigger for macro | Excel Discussion (Misc queries) | |||
How can I get a date in exel to trigger a reminder in 30 days? | Excel Discussion (Misc queries) | |||
Inserting rows on cell trigger | Excel Programming | |||
Recurring annual events using a specific date as a trigger date | Excel Worksheet Functions | |||
Date Flag/Trigger | Excel Programming |