MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Option Explicit Sub Pallet_Tag_PrintSelector() Dim PrintSelection As Integer Dim AllowButtonActions As Boolean Dim DisplayMsg As String ' Get TRUE or FALSE value from Defined Name "AllowButtonActions" AllowButtonActions = Range("AllowButtonActions").Value ' Test the AllowButtonActions value to determine if the Proc should continue If Not AllowButtonActions Then DisplayMsg = MsgBox("Printing has been disabled, until you fill in all required cells.", vbOKOnly, "Printing Disabled") Exit Sub End If PrintSelection = Range("PrintSelection").Value If PrintSelection = 0 Then Call Pallet_Tag_PrintAll Else 'MsgBox PrintSelection ThisWorkbook.Worksheets("Preview").PrintOut End If Range("PrintSelection").Value = "" End Sub Sub Pallet_Tag_PrintAll() Dim i As Integer Dim palletCount As Integer Dim PrintSelection As Integer palletCount = Range("TotalPallets").Value For i = 1 To palletCount Range("PrintSelection").Value = i 'MsgBox PrintSelection ThisWorkbook.Worksheets("Preview").PrintOut Next 'i Range("PrintSelection").Value = "" End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.