This VBA code prevents printing of the workbook if the current date is greater than or equal to May 22, 2011. The code uses an If statement to check if the date is greater than or equal to May 22, 2011, and if so, sets the Cancel variable to True, which cancels the printing.
This VBA code prevents printing of the workbook if the current date is greater than or equal to May 22, 2011. The code uses an If statement to check if the date is greater than or equal to May 22, 2011, and if so, sets the Cancel variable to True, which cancels the printing.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as XLS, PDF, TXT or read online from Scribd
This VBA code prevents printing of the workbook if the current date is greater than or equal to May 22, 2011. The code uses an If statement to check if the date is greater than or equal to May 22, 2011, and if so, sets the Cancel variable to True, which cancels the printing.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as XLS, PDF, TXT or read online from Scribd
Sub Button1 - Click Dim Ws As Worksheet For Each Ws in Worksheets If Not Ws - Name "Sheet1" Then Ws - Range ("A1:K1") .Columns - Autofit Next Ws End Sub
Dim Arrdata As Variant, I As Long 'Sheets ("Sheet2") .Activate Arrdata Range (Cells (1, 1), Cells (2, 1) ) .Value For I 1 To Ubound (Arrdata) Msgbox Arrdata (I, 1) Next I