• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

VB script. error - Procedure is too large

I have a Excel application that has some logic that needs to open a number of tabs based on the number chose from the drop down box on the main form. My issue is that it was working until I added my last bit of code and now it just says the procedure is to large.. any ideas?

Inserted is the code
Private Sub StartSQL_Click()
Application.ScreenUpdating = False
On Error Resume Next
LockUserControl

If Sheet2.[QuoteID].Value = 0 Then
    MsgBox "NO QUOTE SELECTED", vbCritical
    Exit Sub
Else
    Sheet2.[Once] = 1
End If

If IsNumeric(Sheet8.[Quotenumber]) Then Sheet8.[Quotenumber] = "DQM" & Sheet8.[Quotenumber] Else
Sheet8.StartSQL.Visible = 0: Sheet8.RfBt.Visible = -1
QuoteNumberLock
CustView
OurNameView
SalesTypeView
RepView
DQMDateView

ClearFigures
SQL_Connect
SQL_Details
SQL_Connect
SQL_EquipInfo
SQL_Connect
SQL_SvcFigures
SQL_Connect
SQL_SaleRepList
SQL_Connect
SQL_Bookmarks


QSave.Visible = True:   EditB.Visible = True:   EditS.Visible = True:   Legal.Visible = True

With Sheet2
.[StartName] = .[SName]:    .[StartAdd] = .[SAdd]:  .[StartCity] = .[SCity]:    .[StartSt] = .[SSt]:    .[StartZip] = .[SZip]
.[StartBName] = .[bname]:   .[StartBAdd] = .[BAdd]: .[StartBCity] = .[Bcity]:   .[StartBSt] = .[BSt]:   .[StartBZip] = .[BZip]
End With
Sheet17.Visible = xlSheetVisible
Sheet24.Visible = xlSheetVisible
End Sub
Private Sub RfBt_Click()
On Error Resume Next
LockUserControl
ClearFigures
SQL_Connect
SQL_Details
SQL_Connect
SQL_EquipInfo
SQL_Connect
SQL_SvcFigures
SQL_Connect
SQL_Bookmarks
Commission
SaleTypeSelect
End Sub
Private Sub QSave_Click()
SaveBook
End Sub
Private Sub EditB_Click()
    Load BillToForm
    BillToForm.Show
End Sub
Private Sub EditS_Click()
    Load Shipto
    Shipto.Show
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error Resume Next
With Sheet8
Select Case Target.Address
    Case "$D$7"         ' Company Listbox
        CompanySelect
        .Rows("23:25").EntireRow.Hidden = False
    Case "$F$7"         ' Sales Order Listbox
    SaleTypeSelect
    ServiceSelection    'fixes both service and supplier sheets showing for cpi/lease
    Case "$H$9"         ' Multiple Ship to Listbox
            If (.[MultiShip] Like "Y*" Or .[MultiShip] Like "y*") Then
            Sheet2.[SAdd] = "Multiple - See Locations Detail"
            Sheet2.[SCity] = Null:        Sheet2.[SSt] = Null:           Sheet2.[SZip] = Null
            .Rows("23:25").EntireRow.Hidden = True
            Sheet11.Visible = -1
        Else
            Sheet2.[SAdd] = Sheet2.[StartAdd]:  Sheet2.[SCity] = Sheet2.[StartCity]
            Sheet2.[SSt] = Sheet2.[StartSt]: Sheet2.[SZip] = Sheet2.[StartZip]
            .Rows("23:25").EntireRow.Hidden = False
            Sheet11.Visible = xlSheetVeryHidden
        End If
            ServiceSelection
    Case "$D$22"    'Equipment Being Returned (JB)
         If (.[txtequipmentYN] Like "Y*" Or .[txtequipmentYN] Like "y*") Then
         LeaseView
         FNumberView
         End If
    Case "$H$22"   'show proper form per lease type of returned equipment (JB)
        'RK Dixon and number selection code
        If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = -1
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = -1
                Sheet39.Visible = -1
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = -1
                Sheet39.Visible = -1
                Sheet40.Visible = -1
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
        Else
        ' Canon equipment number selection form number
                If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
        If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = -1
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = -1
                Sheet48.Visible = -1
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = -1
                Sheet48.Visible = -1
                Sheet49.Visible = -1
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
        ' Great America equipment number selection form number
          If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = -1
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = -1
                Sheet57.Visible = -1
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = -1
                Sheet57.Visible = -1
                Sheet58.Visible = -1
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
        'Customer Owns equipment number selection form number
          If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = -1
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = -1
                Sheet66.Visible = -1
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = -1
                Sheet66.Visible = -1
                Sheet67.Visible = -1
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    'Other equipment number selection form number
          If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = -1
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = -1
                Sheet75.Visible = -1
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = -1
                Sheet75.Visible = -1
                Sheet76.Visible = -1
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        
         Case "$H$7"         ' Sales Rep Textbox
            Sheet2.[RepID] = Application.VLookup(Sheet8.[RKDRep], Sheet2.[$J$2:$M$55], 2, True)
            Sheet2.[BrID] = Application.VLookup(Sheet8.[RKDRep], Sheet2.[$J$2:$M$55], 4, True)
            BranchID
            CompanySelect
    Case "$J$9"         ' FFK Listbox
        PurchaseAgreement
    
      
    Case "$F$12"        ' Agreement number Textbox
        If (.[Nonappr] Like "Y*" Or .[Nonappr] Like "y*") Then
        Sheet20.Visible = 2
        Else
        Sheet20.Visible = xlSheetVeryHidden
        End If
        SaleTypeSelect
        
        
    Case "$D$15"        'Service Plan Listbox
        ServiceSelection
        SaleTypeSelect 'fixes both service and supplier sheets showing for cpi/lease
    Case "$F$15", "$H$15"
        If (.[SvcTerm] <> "" And .[SDate] <> "") Then .[EDate] = DateAdd("M", .[SvcTerm], DateAdd("D", -1, .[SDate])) Else
        
    Case "$D$17"        'Base Billing Listbox
        Select Case [BBPer]
           Case "Base Monthly"
               Sheet2.[BBP].Value = 1
               Sheet25.[G43] = "Monthly"
           
           Case "Base Quarterly"
               Sheet2.[BBP].Value = 2
               Sheet25.[G43] = "Quarterly"
           
           Case "Base 6 Months"
               Sheet2.[BBP].Value = 3
               Sheet25.[G43] = "Semi-Annually"
           
           Case "Base Yearly"
               Sheet2.[BBP].Value = 4
               Sheet25.[G43] = "Annually"
               
        End Select
        LeaseWithService
    Case "$F$17"        ' Black Billing Listbox
        Select Case [BAPer]
           Case "Black Overages Monthly"
               Sheet2.[BAllow].Value = 1
           
           Case "Black Overages Quarterly"
               Sheet2.[BAllow].Value = 2
           
           Case "Black Overages 6 Months"
               Sheet2.[BAllow].Value = 3
           
           Case "Black Overages Yearly"
               Sheet2.[BAllow].Value = 4
        End Select
               Sheet5.[AE47] = Sheet2.[BlkAllowance]: Sheet5.[AV47] = Sheet2.[EBOver]:
                   
    Case "$H$17"    ' Color Billing Listbox
        Select Case [CAPer]
           Case "Color Overages Monthly"
               Sheet2.[CAllow].Value = 1
               
           Case "Color Overages Quarterly"
               Sheet2.[CAllow].Value = 2
               
           Case "Color Overages 6 Months"
               Sheet2.[CAllow].Value = 3
               
           Case "Color Overages Yearly"
               Sheet2.[CAllow].Value = 4
        End Select
            If Sheet2.[ClrCk] = True Then
                Sheet5.[AE49] = "": Sheet5.[AV49] = ""
            Else
                Sheet5.[AE49] = Sheet2.[ClrAllowance]: Sheet5.[AV49] = Sheet2.[ECOver]
            End If
    
    Case "$D$19"        'Locked Service Rate Listbox
        LockRateSelection

    Case "$F$19"        ' Customer owned Equipment Listbox
        If (.[ExistBx] Like "Y*" Or .[ExistBx] Like "y*") Then
        Sheet6.Visible = -1
        Else
        Sheet6.Visible = xlSheetVeryHidden
        End If

    Case "$J$17"        ' Service Billed with lease Listbox
        
        
    Case "$J$12"        ' ESP Selector
        If (.[ESPSelectbx] Like "Y*" Or .[ESPSelectbx] Like "y*") Then ESPYes Else ESPNo

End Select
End With
End Sub

Open in new window

0
Jennifer Barman
Asked:
Jennifer Barman
  • 4
  • 3
1 Solution
 
Martin LissOlder than dirtCommented:
Break it into two procedures and call the second from the first.
0
 
Jennifer BarmanAuthor Commented:
how do I do that?
0
 
Jennifer BarmanAuthor Commented:
I shortened the code and eliminated lines that were unnessisary. Then it worked. Many of the lines of code will never be touched if you look at the IF statements... the corrisponding sheets and the code that is recognizing those sheets is not needed.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Jennifer BarmanAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for CodeJennifer's comment http:/Q_27510400.html#37341756

for the following reason:

After reviewing the code I found that many of the lines of code are not needed. reduntance so to speak
0
 
Martin LissOlder than dirtCommented:
Something like the following. You could also (or instead) set all the sheets to Visible = 2 at the top of your original sub and then just set the ones to -1 that you need in each case.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error Resume Next
With Sheet8
Select Case Target.Address
    Case "$D$7"         ' Company Listbox
        CompanySelect
        .Rows("23:25").EntireRow.Hidden = False
    Case "$F$7"         ' Sales Order Listbox
    SaleTypeSelect
    ServiceSelection    'fixes both service and supplier sheets showing for cpi/lease
    Case "$H$9"         ' Multiple Ship to Listbox
            If (.[MultiShip] Like "Y*" Or .[MultiShip] Like "y*") Then
            Sheet2.[SAdd] = "Multiple - See Locations Detail"
            Sheet2.[SCity] = Null:        Sheet2.[SSt] = Null:           Sheet2.[SZip] = Null
            .Rows("23:25").EntireRow.Hidden = True
            Sheet11.Visible = -1
        Else
            Sheet2.[SAdd] = Sheet2.[StartAdd]:  Sheet2.[SCity] = Sheet2.[StartCity]
            Sheet2.[SSt] = Sheet2.[StartSt]: Sheet2.[SZip] = Sheet2.[StartZip]
            .Rows("23:25").EntireRow.Hidden = False
            Sheet11.Visible = xlSheetVeryHidden
        End If
            ServiceSelection
    Case "$D$22"    'Equipment Being Returned (JB)
         If (.[txtequipmentYN] Like "Y*" Or .[txtequipmentYN] Like "y*") Then
         LeaseView
         FNumberView
         End If
    Case "$H$22"   'show proper form per lease type of returned equipment (JB)
        'RK Dixon and number selection code
        If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = -1
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = -1
                Sheet39.Visible = -1
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
                  Else
                 If (.[txtleasetype] Like "RKD Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = -1
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = -1
                Sheet33.Visible = -1
                Sheet34.Visible = -1
                Sheet35.Visible = -1
                Sheet36.Visible = -1
                Sheet37.Visible = -1
                Sheet38.Visible = -1
                Sheet39.Visible = -1
                Sheet40.Visible = -1
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
                Sheet27.[MachineName].Text = "RK Dixon"
        Else
        ' Canon equipment number selection form number
                If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
        If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = -1
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = -1
                Sheet48.Visible = -1
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
         If (.[txtleasetype] Like "Canon Financial Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = -1
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = -1
                Sheet42.Visible = -1
                Sheet43.Visible = -1
                Sheet44.Visible = -1
                Sheet45.Visible = -1
                Sheet46.Visible = -1
                Sheet47.Visible = -1
                Sheet48.Visible = -1
                Sheet49.Visible = -1
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
        Else
        ' Great America equipment number selection form number
          If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = -1
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = -1
                Sheet57.Visible = -1
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    If (.[txtleasetype] Like "Great America Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = -1
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = -1
                Sheet51.Visible = -1
                Sheet52.Visible = -1
                Sheet53.Visible = -1
                Sheet54.Visible = -1
                Sheet55.Visible = -1
                Sheet56.Visible = -1
                Sheet57.Visible = -1
                Sheet58.Visible = -1
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
        'Customer Owns equipment number selection form number
          If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = -1
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = -1
                Sheet66.Visible = -1
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Customer Owns" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = 2
                Sheet30.Visible = 2
                Sheet31.Visible = -1
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = -1
                Sheet60.Visible = -1
                Sheet61.Visible = -1
                Sheet62.Visible = -1
                Sheet63.Visible = -1
                Sheet64.Visible = -1
                Sheet65.Visible = -1
                Sheet66.Visible = -1
                Sheet67.Visible = -1
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                    'Other equipment number selection form number
          If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 1) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = 2
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 2) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = 2
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 3) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = 2
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 4) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = 2
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 5) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = 2
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                 If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 6) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = 2
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 7) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = 2
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 8) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = -1
                Sheet75.Visible = 2
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 9) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = -1
                Sheet75.Visible = -1
                Sheet76.Visible = 2
            Else
                If (.[txtleasetype] Like "Other Lease" And .[txtformnumber] = 10) Then
                Sheet27.Visible = 2
                Sheet28.Visible = 2
                Sheet29.Visible = -1
                Sheet30.Visible = 2
                Sheet31.Visible = 2
                Sheet32.Visible = 2
                Sheet33.Visible = 2
                Sheet34.Visible = 2
                Sheet35.Visible = 2
                Sheet36.Visible = 2
                Sheet37.Visible = 2
                Sheet38.Visible = 2
                Sheet39.Visible = 2
                Sheet40.Visible = 2
                Sheet41.Visible = 2
                Sheet42.Visible = 2
                Sheet43.Visible = 2
                Sheet44.Visible = 2
                Sheet45.Visible = 2
                Sheet46.Visible = 2
                Sheet47.Visible = 2
                Sheet48.Visible = 2
                Sheet49.Visible = 2
                Sheet50.Visible = 2
                Sheet51.Visible = 2
                Sheet52.Visible = 2
                Sheet53.Visible = 2
                Sheet54.Visible = 2
                Sheet55.Visible = 2
                Sheet56.Visible = 2
                Sheet57.Visible = 2
                Sheet58.Visible = 2
                Sheet59.Visible = 2
                Sheet60.Visible = 2
                Sheet61.Visible = 2
                Sheet62.Visible = 2
                Sheet63.Visible = 2
                Sheet64.Visible = 2
                Sheet65.Visible = 2
                Sheet66.Visible = 2
                Sheet67.Visible = 2
                Sheet68.Visible = -1
                Sheet69.Visible = -1
                Sheet70.Visible = -1
                Sheet71.Visible = -1
                Sheet72.Visible = -1
                Sheet73.Visible = -1
                Sheet74.Visible = -1
                Sheet75.Visible = -1
                Sheet76.Visible = -1
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        
         Case "$H$7"         ' Sales Rep Textbox
            Sheet2.[RepID] = Application.VLookup(Sheet8.[RKDRep], Sheet2.[$J$2:$M$55], 2, True)
            Sheet2.[BrID] = Application.VLookup(Sheet8.[RKDRep], Sheet2.[$J$2:$M$55], 4, True)
            BranchID
            CompanySelect
    Case "$J$9", "$F$12", "$D$15", "$F$15", "$H$15", "$D$17", "$F$17", "$H$17", "$D$19", "$F$19", "$J$17", "$J$12"
        Part2 Target
End Select
End With
End Sub

Public Sub Part2(ByVal Target As Range)
With Sheet8
Select Case Target.Address

    Case "$J$9"         ' FFK Listbox
        PurchaseAgreement
    
      
    Case "$F$12"        ' Agreement number Textbox
        If (.[Nonappr] Like "Y*" Or .[Nonappr] Like "y*") Then
        Sheet20.Visible = 2
        Else
        Sheet20.Visible = xlSheetVeryHidden
        End If
        SaleTypeSelect
        
        
    Case "$D$15"        'Service Plan Listbox
        ServiceSelection
        SaleTypeSelect 'fixes both service and supplier sheets showing for cpi/lease
    Case "$F$15", "$H$15"
        If (.[SvcTerm] <> "" And .[SDate] <> "") Then .[EDate] = DateAdd("M", .[SvcTerm], DateAdd("D", -1, .[SDate])) Else
        
    Case "$D$17"        'Base Billing Listbox
        Select Case [BBPer]
           Case "Base Monthly"
               Sheet2.[BBP].Value = 1
               Sheet25.[G43] = "Monthly"
           
           Case "Base Quarterly"
               Sheet2.[BBP].Value = 2
               Sheet25.[G43] = "Quarterly"
           
           Case "Base 6 Months"
               Sheet2.[BBP].Value = 3
               Sheet25.[G43] = "Semi-Annually"
           
           Case "Base Yearly"
               Sheet2.[BBP].Value = 4
               Sheet25.[G43] = "Annually"
               
        End Select
        LeaseWithService
    Case "$F$17"        ' Black Billing Listbox
        Select Case [BAPer]
           Case "Black Overages Monthly"
               Sheet2.[BAllow].Value = 1
           
           Case "Black Overages Quarterly"
               Sheet2.[BAllow].Value = 2
           
           Case "Black Overages 6 Months"
               Sheet2.[BAllow].Value = 3
           
           Case "Black Overages Yearly"
               Sheet2.[BAllow].Value = 4
        End Select
               Sheet5.[AE47] = Sheet2.[BlkAllowance]: Sheet5.[AV47] = Sheet2.[EBOver]:
                   
    Case "$H$17"    ' Color Billing Listbox
        Select Case [CAPer]
           Case "Color Overages Monthly"
               Sheet2.[CAllow].Value = 1
               
           Case "Color Overages Quarterly"
               Sheet2.[CAllow].Value = 2
               
           Case "Color Overages 6 Months"
               Sheet2.[CAllow].Value = 3
               
           Case "Color Overages Yearly"
               Sheet2.[CAllow].Value = 4
        End Select
            If Sheet2.[ClrCk] = True Then
                Sheet5.[AE49] = "": Sheet5.[AV49] = ""
            Else
                Sheet5.[AE49] = Sheet2.[ClrAllowance]: Sheet5.[AV49] = Sheet2.[ECOver]
            End If
    
    Case "$D$19"        'Locked Service Rate Listbox
        LockRateSelection

    Case "$F$19"        ' Customer owned Equipment Listbox
        If (.[ExistBx] Like "Y*" Or .[ExistBx] Like "y*") Then
        Sheet6.Visible = -1
        Else
        Sheet6.Visible = xlSheetVeryHidden
        End If

    Case "$J$17"        ' Service Billed with lease Listbox
        
        
    Case "$J$12"        ' ESP Selector
        If (.[ESPSelectbx] Like "Y*" Or .[ESPSelectbx] Like "y*") Then ESPYes Else ESPNo
End Select
End With
End Sub

Open in new window

0
 
Martin LissOlder than dirtCommented:
Well I did give him an alternative (setting all sheets to 2) that he might want to consider.
0
 
Martin LissOlder than dirtCommented:

You're welcome and I'm glad I was able to help. (And sorry about the "him")
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now