Option Explicit
Sub print_reg_form()
If ActiveSheet.CheckBoxes("agree_check").Value = -4146 Then
MsgBox ("Sorry, I cannot sell this shareware to you because you don't agree with the contract."), vbExclamation
Else
On Error GoTo p_er
With ActiveSheet
With .PageSetup
.CenterHorizontally = True
.Orientation = 1
.Draft = False
.BlackAndWhite = True
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
.PrintOut
End With
Exit Sub
p_er:
MsgBox ("Error printing out registration form."), vbExclamation
End If
End Sub
Sub formsheet_reset()
Application.ScreenUpdating = False
Dim reg_items, reg_S%
reg_items = Array("NAME", "COMPANY", "EMAIL", "ADDRESS", "address2", "LICENSE1", "LICENSE2", "BONUS")
With Worksheets(1)
For reg_S = 0 To 7
.Range(reg_items(reg_S)).ClearContents
Next
.Unprotect
.Range("discount").Value = 0
.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
.CheckBoxes("MACMAC").Value = -4146
.CheckBoxes("agree_check").Value = -4146
End With
End Sub
Sub macmacmac()
With ActiveSheet
.Unprotect
With .Range("discount")
If ActiveSheet.CheckBoxes("MACMAC").Value = 1 Then
.Value = -10
Else
.Value = 0
End If
End With
.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End With
End Sub
