Print All Macros

Опубликовано: 09 Август 2026
на канале: Springfield Strength
226
4

Below is the code that was shown on the video. Copy and past it EXACTLY as shown but change the range to fit the name of your athlete cell.

Sub OffSeason1()
    Dim strValidationRange As String
    Dim rngValidation As Range
    Dim rngDepartment As Range
     
     ' Turn off screen updating
    Application.ScreenUpdating = False
     
     ' Identify the source list of the data validation
    strValidationRange = Range("athlete1").Validation.Formula1
    Set rngValidation = Range(strValidationRange)
     
     ' Set the value in the selection cell to each selection in turn
     ' and print the results.
    For Each rngDepartment In rngValidation.Cells
        Range("athlete1").Value = rngDepartment.Value
        ActiveSheet.PrintOut
    Next
     
    Application.ScreenUpdating = True
End Sub