Results 1 to 20 of 22

Thread: Update Calendar Fills by Revolving Sequence Using VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,954
    Location
    Here is the delete macro that you can Assign. Test on backup copy as usual.
    Sub Del12Months()    
         Dim i As Integer, j As Integer, r As Range, c As Range    
         Application.EnableEvents = False
         Application.ScreenUpdating = False
         Application.Calculation = xlCalculationManual
         With Worksheets("Year Planner")
             ' With ActiveSheet  'Used for quick testing on copies of sheet1 as activesheet.
             For i = 7 To 52 Step 15
                  ' 1st row of 3 months menus
                  Set r = Range(.Cells(i, "A"), .Cells(i, "W")).Offset(3)
                  For j = 0 To 10 Step 2
                      Set c = r.Offset(j)
                      c.ClearContents
                  Next j
             Next i
        End With    
        Application.EnableEvents = True
        Application.ScreenUpdating = True
        Application.Calculation = xlCalculationAutomatic
    End Sub
    Last edited by Aussiebear; 02-05-2025 at 12:00 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •