Add Items to a combobox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • felipebucaram
    New Member
    • Aug 2009
    • 8

    Add Items to a combobox

    Hi, I have a combobox named "combo7", I have 3 problems to resolve.
    First, I need the user to be able to add items to the combobox from the userform.
    Second, I need the combobox to autocomplete when the user writes something similar.
    Third, I need the user to be able to select multiple items from the combobox.
    Fourth, I need it to be syncronized to other comboboxes, so that they all contain always the same information, even if someone add a new item.


    I know it' a lot of work so Thanks a Lot!!!!!!!!!!!
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    these are pretty simple task.

    kindly post the code that you are working on .

    Comment

    • felipebucaram
      New Member
      • Aug 2009
      • 8

      #3
      As you can see i have comboboxes that have the same information. I realized that its better if i use database so im going to read about it. After that i think im going to need help again.(If you can reccommend me some links i'll be thankful)

      For now i only have 1 question:

      Instead of using those comboboxes with numbers you see at the end, maybe its better if i use the calendar control 11.0 option. Here what i need:

      - I need the calendar to pop up from the userform (after clicking a button, entering a textbox or something)
      - Then choose the month, the year
      - Finally after choosing the day i need the calendar to automatically close leaving the date in the textbox

      I need it to pop up because its too big and it occupates too much space.

      THANKS AGAIN

      CODE (JUST IN CASE):
      Code:
      Private Sub CANCEL_Click()
         Unload Me
         ActiveDocument.Close SaveChanges:=False
      End Sub
      
      Private Sub chkCECOES_Click()
      If chkCECOES = False Then cboy5.Value = Null Else cboy5.Value = "2009"
      If chkCECOES = False Then cbod5.BackColor = &H8000000F
      If chkCECOES = False Then cbom5.Enabled = False
      If chkCECOES = False Then cbom5.BackColor = &H8000000F
      If chkCECOES = False Then cboy5.Enabled = False
      If chkCECOES = False Then cboy5.BackColor = &H8000000F
      If chkCECOES = True Then cbod5.Enabled = True
      If chkCECOES = True Then cbod5.BackColor = &H80000009
      If chkCECOES = True Then cbom5.Enabled = True
      If chkCECOES = True Then cbom5.BackColor = &H80000009
      If chkCECOES = True Then cboy5.Enabled = True
      If chkCECOES = True Then cboy5.BackColor = &H80000009
      End Sub
      
      Private Sub chkCPG_Click()
      If chkCPG = False Then cboy6.Value = Null Else cboy6.Value = "2009"
      If chkCPG = False Then cbod6.BackColor = &H8000000F
      If chkCPG = False Then cbom6.Enabled = False
      If chkCPG = False Then cbom6.BackColor = &H8000000F
      If chkCPG = False Then cboy6.Enabled = False
      If chkCPG = False Then cboy6.BackColor = &H8000000F
      If chkCPG = True Then cbod6.Enabled = True
      If chkCPG = True Then cbod6.BackColor = &H80000009
      If chkCPG = True Then cbom6.Enabled = True
      If chkCPG = True Then cbom6.BackColor = &H80000009
      If chkCPG = True Then cboy6.Enabled = True
      If chkCPG = True Then cboy6.BackColor = &H80000009
      End Sub
      
      Private Sub chkSRI_Click()
      If chkSRI = False Then cboy7.Value = Null Else cboy7.Value = "2009"
      If chkSRI = False Then cbod7.Enabled = False
      If chkSRI = False Then cbod7.BackColor = &H8000000F
      If chkSRI = False Then cbom7.Enabled = False
      If chkSRI = False Then cbom7.BackColor = &H8000000F
      If chkSRI = False Then cboy7.Enabled = False
      If chkSRI = False Then cboy7.BackColor = &H8000000F
      If chkSRI = True Then cbod7.Enabled = True
      If chkSRI = True Then cbod7.BackColor = &H80000009
      If chkSRI = True Then cbom7.Enabled = True
      If chkSRI = True Then cbom7.BackColor = &H80000009
      If chkSRI = True Then cboy7.Enabled = True
      If chkSRI = True Then cboy7.BackColor = &H80000009
      End Sub
      
      
      
      Private Sub optCODNO_Click()
      If optCODNO = True Then cbod5.BackColor = &H8000000F
      If optCODNO = True Then cbod5.Enabled = False
      If optCODNO = True Then cbom5.BackColor = &H8000000F
      If optCODNO = True Then cbom5.Enabled = False
      If optCODNO = True Then cboy5.BackColor = &H8000000F
      If optCODNO = True Then cboy5.Enabled = False
      If optCODNO = True Then chkCECOES.Enabled = False
      If optCODNO = True Then chkCECOES.BackColor = &H8000000F
      If optCODNO = True Then chkCECOD.Enabled = False
      If optCODNO = True Then cbod4.BackColor = &H8000000F
      If optCODNO = True Then cbod4.Enabled = False
      If optCODNO = True Then cbom4.BackColor = &H8000000F
      If optCODNO = True Then cbom4.Enabled = False
      If optCODNO = True Then cboy4.BackColor = &H8000000F
      If optCODNO = True Then cboy4.Enabled = False
      If optCODNO = True Then frmCOD.Visible = False
      End Sub
      
      Private Sub optCODOTR_Click()
      If optCODOTR = True Then chkCECOES.Enabled = True
      If optCODOTR = True Then chkCECOD.Enabled = True
      If optCODOTR = True Then cbod5.BackColor = &H80000009
      If optCODOTR = True Then cbod5.Enabled = True
      If optCODOTR = True Then cbom5.BackColor = &H80000009
      If optCODOTR = True Then cbom5.Enabled = True
      If optCODOTR = True Then cboy5.BackColor = &H80000009
      If optCODOTR = True Then cboy5.Enabled = True
      If optCODOTR = True Then cbod4.BackColor = &H80000009
      If optCODOTR = True Then cbod4.Enabled = True
      If optCODOTR = True Then cbom4.BackColor = &H80000009
      If optCODOTR = True Then cbom4.Enabled = True
      If optCODOTR = True Then cboy4.BackColor = &H80000009
      If optCODOTR = True Then cboy4.Enabled = True
      If optCODOTR = True Then txtCODCY.Enabled = True
      If optCODOTR = True Then txtCODCY.BackColor = &H80000009
      If optCODOTR = True Then LBLCODCYCE.Enabled = True
      End Sub
      
      Private Sub optCODSI_Click()
      If optCODSI = True Then cbod5.BackColor = &H80000009
      If optCODSI = True Then cbod5.Enabled = True
      If optCODSI = True Then cbom5.BackColor = &H80000009
      If optCODSI = True Then cbom5.Enabled = True
      If optCODSI = True Then cboy5.BackColor = &H80000009
      If optCODSI = True Then cboy5.Enabled = True
      If optCODSI = True Then chkCECOES.Enabled = True
      If optCODSI = True Then chkCECOD.Enabled = True
      If optCODSI = True Then chkCECOD.Enabled = True
      If optCODSI = True Then cbod4.BackColor = &H80000009
      If optCODSI = True Then cbod4.Enabled = True
      If optCODSI = True Then cbom4.BackColor = &H80000009
      If optCODSI = True Then cbom4.Enabled = True
      If optCODSI = True Then cboy4.BackColor = &H80000009
      If optCODSI = True Then cboy4.Enabled = True
      If optCODSI = True Then frmCOD.Visible = True
      End Sub
      
      Private Sub optCODSOL_Click()
      If optCODSOL = True Then chkCECOES.Enabled = False
      If optCODSOL = True Then cbod5.BackColor = &H8000000F
      If optCODSOL = True Then cbod5.Enabled = False
      If optCODSOL = True Then cbom5.BackColor = &H8000000F
      If optCODSOL = True Then cbom5.Enabled = False
      If optCODSOL = True Then cboy5.BackColor = &H8000000F
      If optCODSOL = True Then cboy5.Enabled = False
      If optCODSOL = True Then txtCODCY.Enabled = False
      If optCODSOL = True Then LBLCODCYCE.Enabled = False
      If optCODSOL = True Then txtCODCY.BackColor = &H8000000F
      End Sub
      
      
      Private Sub optOTR_Click()
      If optOTR = True Then chkCEE.Enabled = True
      If optOTR = True Then chkCEE.Enabled = True
      If optOTR = True Then cbod3.BackColor = &H80000009
      If optOTR = True Then cbod3.Enabled = True
      If optOTR = True Then cbom3.BackColor = &H80000009
      If optOTR = True Then cbom3.Enabled = True
      If optOTR = True Then cboy3.BackColor = &H80000009
      If optOTR = True Then cboy3.Enabled = True
      If optOTR = True Then NMBCY.Enabled = True
      If optOTR = True Then CICY.Enabled = True
      If optOTR = True Then lblCY.Enabled = True
      If optOTR = True Then lblCICY.Enabled = True
      If optOTR = True Then NMBCY.BackColor = &H80000009
      If optOTR = True Then CICY.BackColor = &H80000009
      If optOTR = True Then lblCY.BackColor = &H8000000F
      If optOTR = True Then lblCICY.BackColor = &H8000000F
      End Sub
      
      Private Sub optSOLT_Click()
      If optSOLT = True Then chkCEE.Enabled = False
      If optSOLT = True Then chkCEE.BackColor = &H8000000F
      If optSOLT = True Then chkCEE.Enabled = False
      If optSOLT = True Then cbod3.BackColor = &H8000000F
      If optSOLT = True Then cbod3.Enabled = False
      If optSOLT = True Then cbom3.BackColor = &H8000000F
      If optSOLT = True Then cbom3.Enabled = False
      If optSOLT = True Then cboy3.BackColor = &H8000000F
      If optSOLT = True Then cboy3.Enabled = False
      If optSOLT = True Then CICY.Enabled = False
      If optSOLT = True Then NMBCY.BackColor = &H8000000F
      If optSOLT = True Then CICY.BackColor = &H8000000F
      If optSOLT = True Then lblCY.Enabled = False
      If optSOLT = True Then lblCICY.Enabled = False
      End Sub
      Private Sub cbom4_Change()
      
      End Sub
      
      Private Sub chkCECOD_Click()
      If chkCECOD = False Then cboy4.Value = Null Else cboy4.Value = "2009"
      If chkCECOD = False Then cbod4.BackColor = &H8000000F
      If chkCECOD = False Then cbom4.Enabled = False
      If chkCECOD = False Then cbom4.BackColor = &H8000000F
      If chkCECOD = False Then cboy4.Enabled = False
      If chkCECOD = False Then cboy4.BackColor = &H8000000F
      If chkCECOD = True Then cbod4.Enabled = True
      If chkCECOD = True Then cbod4.BackColor = &H80000009
      If chkCECOD = True Then cbom4.Enabled = True
      If chkCECOD = True Then cbom4.BackColor = &H80000009
      If chkCECOD = True Then cboy4.Enabled = True
      If chkCECOD = True Then cboy4.BackColor = &H80000009
      End Sub
      
      Private Sub chkCED_Click()
         If chkCED = False Then cboy2.Value = Null Else cboy2.Value = "2009"
         If chkRUC = False Then cbod1.Enabled = False
      If chkCED = False Then cbod2.BackColor = &H8000000F
      If chkCED = False Then cbom2.Enabled = False
      If chkCED = False Then cbom2.BackColor = &H8000000F
      If chkCED = False Then cboy2.Enabled = False
      If chkCED = False Then cboy2.BackColor = &H8000000F
      If chkCED = True Then cbod2.Enabled = True
      If chkCED = True Then cbod2.BackColor = &H80000009
      If chkCED = True Then cbom2.Enabled = True
      If chkCED = True Then cbom2.BackColor = &H80000009
      If chkCED = True Then cboy2.Enabled = True
      If chkCED = True Then cboy2.BackColor = &H80000009
      End Sub
      
      Private Sub chkCEE_Click()
      If chkCEE = False Then cboy3.Value = Null Else cboy3.Value = "2009"
      If chkCEE = False Then cbod3.Enabled = False
      If chkCEE = False Then cbod3.BackColor = &H8000000F
      If chkCEE = False Then cbom3.Enabled = False
      If chkCEE = False Then cbom3.BackColor = &H8000000F
      If chkCEE = False Then cboy3.Enabled = False
      If chkCEE = False Then cboy3.BackColor = &H8000000F
      If chkCEE = True Then cbod3.Enabled = True
      If chkCEE = True Then cbod3.BackColor = &H80000009
      If chkCEE = True Then cbom3.Enabled = True
      If chkCEE = True Then cbom3.BackColor = &H80000009
      If chkCEE = True Then cboy3.Enabled = True
      If chkCEE = True Then cboy3.BackColor = &H80000009
      End Sub
      
      Private Sub chkRUC_Click()
      If chkRUC = False Then cboy1.Value = Null Else cboy1.Value = "2009"
      If chkRUC = False Then cbod1.Enabled = False
      If chkRUC = False Then cbod1.BackColor = &H8000000F
      If chkRUC = False Then cbom1.Enabled = False
      If chkRUC = False Then cbom1.BackColor = &H8000000F
      If chkRUC = False Then cboy1.Enabled = False
      If chkRUC = False Then cboy1.BackColor = &H8000000F
      If chkRUC = True Then cbod1.Enabled = True
      If chkRUC = True Then cbod1.BackColor = &H80000009
      If chkRUC = True Then cbom1.Enabled = True
      If chkRUC = True Then cbom1.BackColor = &H80000009
      If chkRUC = True Then cboy1.Enabled = True
      If chkRUC = True Then cboy1.BackColor = &H80000009
      End Sub
      
      Private Sub CLEAR_Click()
         SEC.Value = Null
         PLZ.Value = Null
         MNT.Value = Null
         CI.Value = Null
         ACT.Value = Null
         NMB.Value = Null
         NMBCY.Value = Null
         CICY.Value = Null
         cbod1.Value = Null
         cbom1.Value = Null
         cboy1.Value = Null
         cboDEST.Value = "AF y CT"
         
      End Sub
      
      
      Private Sub OK_Click()
      
                   '--------  DOCUMENTOS  ---------
      
      'OCTAVA LINEA (CPG)
      Dim strCPG  As String
      If chkCECOD = False Then strCPG = Space(1)
      
      With ActiveDocument
          .Bookmarks("CPG").Range.Text = strCPG
          .Bookmarks("d8").Range.Text = cbod8.Value
          .Bookmarks("m8").Range.Text = cbom8.Value
          .Bookmarks("y8").Range.Text = cboy8.Value
      
      'SEPTIMA LINEA (SRI)
      Dim strSRI  As String
      If chkSRI = False Then strSRI = Space(1)
      
      With ActiveDocument
          .Bookmarks("IES").Range.Text = strSRI
          .Bookmarks("d7").Range.Text = cbod7.Value
          .Bookmarks("m7").Range.Text = cbom7.Value
          .Bookmarks("y7").Range.Text = cboy7.Value
          End With
          
      'SEXTA LINEA (IESS)
      
      Dim strIES  As String
      If chkIES = False Then strIES = Space(1)
      
      With ActiveDocument
          .Bookmarks("IES").Range.Text = strIES
          .Bookmarks("d6").Range.Text = cbod5.Value
          .Bookmarks("m6").Range.Text = cbom5.Value
          .Bookmarks("y6").Range.Text = cboy5.Value
          End With
          
      'QUINTA LINEA (CONYUGE CODEUDOR)
      
      Dim strCECODES  As String
      If chkCECOD = False Then strCECODES = Space(1)
      
      With ActiveDocument
          .Bookmarks("CECOES").Range.Text = strCECODES
          .Bookmarks("NMBCOES").Range.Text = txtCODCY
          .Bookmarks("d5").Range.Text = cbod5.Value
          .Bookmarks("m5").Range.Text = cbom5.Value
          .Bookmarks("y5").Range.Text = cboy5.Value
          End With
          
      'CUARTA LINEA (CI CODEUDOR)
      Dim strCECOD As String
      If chkCECOD = False Then strCECOD = Space(1)
      
      
      With ActiveDocument
          .Bookmarks("CECOD").Range.Text = strCECOD
          .Bookmarks("NMBCO").Range.Text = txtCOD.Value
          .Bookmarks("d4").Range.Text = cbod4.Value
          .Bookmarks("m4").Range.Text = cbom4.Value
          .Bookmarks("y4").Range.Text = cboy4.Value
      End With
      
      
      'TERCERA LINEA (CI CONYUGE DEUDOR)
      Dim strCEE As String
      If chkCEE = False Then strCEE = Space(1)
      
      With ActiveDocument
          .Bookmarks("CEE").Range.Text = strCEE
          .Bookmarks("NMBCY3").Range.Text = NMBCY.Value
          .Bookmarks("d3").Range.Text = cbod3.Value
          .Bookmarks("m3").Range.Text = cbom3.Value
          .Bookmarks("y3").Range.Text = cboy3.Value
      End With
      
      'SEGUNDA LINEA (CI DEUDOR)
      Dim strCED As String
      If chkCED = False Then strCED = Space(1)
      
      With ActiveDocument
          .Bookmarks("CED").Range.Text = strCED
          .Bookmarks("NMB2").Range.Text = NMB.Value
          .Bookmarks("d2").Range.Text = cbod2.Value
          .Bookmarks("m2").Range.Text = cbom2.Value
          .Bookmarks("y2").Range.Text = cboy2.Value
      End With
      
      'PRIMERA LINEA (RUC)
      Dim strRUC As String
      If chkRUC = False Then strRUC = Space(1)
      
      With ActiveDocument
            .Bookmarks("RUC").Range.Text = strRUC
            .Bookmarks("d1").Range.Text = cbod1.Value
            .Bookmarks("m1").Range.Text = cbom1.Value
            .Bookmarks("y1").Range.Text = cboy1.Value
      End With
      
                                       '------ INFO --------
      'DESTINO
      Dim strDEST As String
      If cboDEST = "AF y CT" Then strDEST = "ACTIVO FIJO y CAPITAL DE TRABAJO"
      If cboDEST = "AF" Then strDEST = "ACTIVO FIJO"
      If cboDEST = "CT" Then strDEST = "CAPITAL DE TRABAJO"
      
      
      With ActiveDocument
            'SECTOR
            .Bookmarks("SEC").Range.Text = SEC.Value
            'MONTO
            .Bookmarks("MNT").Range.Text = MNT.Value
            'PLAZO
            .Bookmarks("PLZ").Range.Text = PLZ.Value
            'NUMERO DE CI
            .Bookmarks("CI").Range.Text = CI.Value
            'ACTIVIDAD
            .Bookmarks("ACT").Range.Text = ACT.Value
            'DEUDOR
            .Bookmarks("NMB").Range.Text = NMB.Value
            .Bookmarks("NMB0").Range.Text = NMB.Value
            .Bookmarks("NMB00").Range.Text = NMB.Value
            'CONYUGE DEL DEUDOR
            .Bookmarks("NMBCY").Range.Text = NMBCY.Value
          End With
          
             Dim strSOLT As String
             If optSOLT = True Then strSOLT = "SOLTERO(A)"
       
             ActiveDocument.Bookmarks("NMBCY").Range.Text = strSOLT
             'CEDULA DEL CONYUGE
            .Bookmarks("CICY").Range.Text = CICY.Value
            
            Dim strCICY As String
            If optSOLT = True Then strCICY = "----------"
      
            ActiveDocument.Bookmarks("CICY").Range.Text = strCICY
             'DESTINO
            .Bookmarks("DES").Range.Text = strDEST
            
         End With
              Application.ScreenUpdating = True
              Unload Me
              
      
         End Sub
              'RESET
      Private Sub reset_Click()
         SEC.Value = Null
         PLZ.Value = Null
         MNT.Value = Null
         ACT.Value = Null
         NMB.Value = Null
         cbod1.Value = Null
         cbom1.Value = Null
         cboy1.Value = "2009"
         SEC.Value = "Guayaquil"
         CI.Value = "001"
         NMBCY.Value = Null
         CICY.Value = Null
         cboDEST.Value = "AF y CT"
      End Sub
      
      
      
      Private Sub SpinButton1_Change()
      
      End Sub
      
      Private Sub scrHIP1_Change()
      
      If scrHIP1.Value = 1 Then frmHIP1.Visible = True
      If scrHIP1.Value = 1 Then frmHIP2.Visible = False
      If scrHIP1.Value = 1 Then frmHIP3.Visible = False
      If scrHIP1.Value = 1 Then frmHIP4.Visible = False
      If scrHIP1.Value = 1 Then frmHIP5.Visible = False
      
      If scrHIP1.Value = 2 Then frmHIP1.Visible = False
      If scrHIP1.Value = 2 Then frmHIP2.Visible = True
      If scrHIP1.Value = 2 Then frmHIP3.Visible = False
      If scrHIP1.Value = 2 Then frmHIP4.Visible = False
      If scrHIP1.Value = 2 Then frmHIP5.Visible = False
      
      If scrHIP1.Value = 3 Then frmHIP1.Visible = False
      If scrHIP1.Value = 3 Then frmHIP2.Visible = False
      If scrHIP1.Value = 3 Then frmHIP3.Visible = True
      If scrHIP1.Value = 3 Then frmHIP4.Visible = False
      If scrHIP1.Value = 3 Then frmHIP5.Visible = False
      
      If scrHIP1.Value = 4 Then frmHIP1.Visible = False
      If scrHIP1.Value = 4 Then frmHIP2.Visible = False
      If scrHIP1.Value = 4 Then frmHIP3.Visible = False
      If scrHIP1.Value = 4 Then frmHIP4.Visible = True
      If scrHIP1.Value = 4 Then frmHIP5.Visible = False
      
      If scrHIP1.Value = 5 Then frmHIP1.Visible = False
      If scrHIP1.Value = 5 Then frmHIP2.Visible = False
      If scrHIP1.Value = 5 Then frmHIP3.Visible = False
      If scrHIP1.Value = 5 Then frmHIP4.Visible = False
      If scrHIP1.Value = 5 Then frmHIP5.Visible = True
      
      End Sub
      
      Private Sub txtHIP1_Change()
      
      End Sub
      
      Private Sub txtING1_Change()
      
      End Sub
      
      Private Sub txtNUMVIN_Change()
      If txtNUMVIN.Text = "" Then frmVINCU1.Visible = False
      If txtNUMVIN.Text = "" Then frmVINCU1.Enabled = False
      If txtNUMVIN.Text = "" Then frmVINCU2.Visible = False
      If txtNUMVIN.Text = "" Then frmVINCU2.Enabled = False
      If txtNUMVIN.Text = "" Then frmVINCU3.Visible = False
      If txtNUMVIN.Text = "" Then frmVINCU3.Enabled = False
      
      If txtNUMVIN.Text = "1" Then frmVINCU1.Visible = True
      If txtNUMVIN.Text = "1" Then frmVINCU1.Enabled = True
      If txtNUMVIN.Text = "1" Then frmVINCU2.Visible = False
      If txtNUMVIN.Text = "1" Then frmVINCU2.Enabled = False
      If txtNUMVIN.Text = "1" Then frmVINCU3.Visible = False
      If txtNUMVIN.Text = "1" Then frmVINCU3.Enabled = False
      
      If txtNUMVIN.Text = "2" Then frmVINCU1.Visible = True
      If txtNUMVIN.Text = "2" Then frmVINCU1.Enabled = True
      If txtNUMVIN.Text = "2" Then frmVINCU2.Visible = True
      If txtNUMVIN.Text = "2" Then frmVINCU2.Enabled = True
      If txtNUMVIN.Text = "2" Then frmVINCU3.Visible = False
      If txtNUMVIN.Text = "2" Then frmVINCU3.Enabled = False
      
      If txtNUMVIN.Text = "3" Then frmVINCU1.Visible = True
      If txtNUMVIN.Text = "3" Then frmVINCU1.Enabled = True
      If txtNUMVIN.Text = "3" Then frmVINCU2.Visible = True
      If txtNUMVIN.Text = "3" Then frmVINCU2.Enabled = True
      If txtNUMVIN.Text = "3" Then frmVINCU3.Visible = True
      If txtNUMVIN.Text = "3" Then frmVINCU3.Enabled = True
      End Sub
      
      Private Sub txtNUMING_Change()
      
      If txtNUMING.Text = "" Then frmINGRESOS1.Visible = False
      If txtNUMING.Text = "" Then frmINGRESOS1.Enabled = False
      If txtNUMING.Text = "" Then frmINGRESOS2.Visible = False
      If txtNUMING.Text = "" Then frmINGRESOS2.Enabled = False
      If txtNUMING.Text = "" Then frmINGRESOS3.Visible = False
      If txtNUMING.Text = "" Then frmINGRESOS3.Enabled = False
      
      If txtNUMING.Text = "1" Then frmINGRESOS1.Visible = True
      If txtNUMING.Text = "1" Then frmINGRESOS1.Enabled = True
      If txtNUMING.Text = "1" Then frmINGRESOS2.Visible = False
      If txtNUMING.Text = "1" Then frmINGRESOS2.Enabled = False
      If txtNUMING.Text = "1" Then frmINGRESOS3.Visible = False
      If txtNUMING.Text = "1" Then frmINGRESOS3.Enabled = False
      
      If txtNUMING.Text = "2" Then frmINGRESOS1.Visible = True
      If txtNUMING.Text = "2" Then frmINGRESOS1.Enabled = True
      If txtNUMING.Text = "2" Then frmINGRESOS2.Visible = True
      If txtNUMING.Text = "2" Then frmINGRESOS2.Enabled = True
      If txtNUMING.Text = "2" Then frmINGRESOS3.Visible = False
      If txtNUMING.Text = "2" Then frmINGRESOS3.Enabled = False
      
      If txtNUMING.Text = "3" Then frmINGRESOS1.Visible = True
      If txtNUMING.Text = "3" Then frmINGRESOS1.Enabled = True
      If txtNUMING.Text = "3" Then frmINGRESOS2.Visible = True
      If txtNUMING.Text = "3" Then frmINGRESOS2.Enabled = True
      If txtNUMING.Text = "3" Then frmINGRESOS3.Visible = True
      If txtNUMING.Text = "3" Then frmINGRESOS3.Enabled = True
      
      
      End Sub
      
      Private Sub txtNUMING_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
      If KeyAscii >= 49 And KeyAscii <= 51 Then
        Exit Sub
      Else
        KeyAscii = 0
        Beep
        MsgBox "Màx 3"
        
      End If
      
      End Sub
      
      
       ' ---- INICIO  ----
      Private Sub UserForm_Initialize()
      
      cboING1.AddItem "456"
      
      
      
      frmHIP1.Visible = True
      frmHIP2.Visible = False
      frmHIP3.Visible = False
      frmHIP4.Visible = False
      frmHIP5.Visible = False
      scrHIP1.Value = 1
      
      cbod7.Enabled = False
      cbod7.BackColor = &H8000000F
      cbom7.Enabled = False
      cbom7.BackColor = &H8000000F
      cboy7.Enabled = False
      cboy7.BackColor = &H8000000F
      
          'POR DEFAULT
      SEC.Value = "Guayaquil"
      CI.Value = "001"
      cboDEST.Value = "AF y CT"
      
      'OPTIONBOXES
      optSOLT.Value = True
      optCODNO.Value = True
      optCODSOL.Value = True
      
      'CHECKBOXES
      chkRUC.Value = True
      chkSRI.Value = False
      chkCED.Value = True
      chkCPG.Value = True
      chkIES.Value = True
      
      'COMBOBOXES
      cboy1.Value = "2009"
      cboy2.Value = "2009"
      cboy3.Value = "2009"
      cboy4.Value = "2009"
      cboy5.Value = "2009"
      cboy6.Value = "2009"
      cboy7.Value = "2009"
      cboy8.Value = "2009"
         
         'COMBOBOXES INFO
         With cboDEST
            .AddItem "AF"
            .AddItem "CT"
            .AddItem "AF y CT"
      End With
      
      With cbod8
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom8
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy8
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
      
      With cbod7
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom7
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy7
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
      
      With cbod6
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom6
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy6
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
      
      With cbod1
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
      
      With cbod5
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom5
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy5
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
      
      With cbod1
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
      
      With cbod3
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom3
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy3
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
      
      With cbod1
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom1
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy1
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
         
         With cbod2
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom2
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy2
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
         
          With cbod4
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
            .AddItem "13"
            .AddItem "14"
            .AddItem "15"
            .AddItem "15"
            .AddItem "16"
            .AddItem "17"
            .AddItem "18"
            .AddItem "19"
            .AddItem "20"
            .AddItem "21"
            .AddItem "22"
            .AddItem "23"
            .AddItem "24"
            .AddItem "25"
            .AddItem "26"
            .AddItem "27"
            .AddItem "28"
            .AddItem "29"
            .AddItem "30"
            .AddItem "31"
         End With
         
         With cbom4
            .AddItem "01"
            .AddItem "02"
            .AddItem "03"
            .AddItem "04"
            .AddItem "05"
            .AddItem "06"
            .AddItem "07"
            .AddItem "08"
            .AddItem "09"
            .AddItem "10"
            .AddItem "11"
            .AddItem "12"
         End With
         
         With cboy4
            .AddItem "2011"
            .AddItem "2010"
            .AddItem "2009"
            .AddItem "2008"
            .AddItem "2007"
            .AddItem "2006"
            .AddItem "2005"
            .AddItem "2004"
            .AddItem "2003"
            .AddItem "2002"
            .AddItem "2001"
            .AddItem "2000"
            .AddItem "1999"
            .AddItem "1997"
            .AddItem "1996"
            .AddItem "1995"
            .AddItem "1994"
            .AddItem "1993"
            .AddItem "1992"
            .AddItem "1991"
            .AddItem "1990"
            .AddItem "1989"
            .AddItem "1988"
            .AddItem "1987"
            .AddItem "1986"
            .AddItem "1985"
            .AddItem "1984"
            .AddItem "1983"
            .AddItem "1982"
            .AddItem "1981"
            .AddItem "1980"
            .AddItem "1979"
            .AddItem "1978"
            .AddItem "1977"
            .AddItem "1976"
            .AddItem "1975"
            .AddItem "1974"
            .AddItem "1973"
            .AddItem "1972"
            .AddItem "1971"
            .AddItem "1970"
            .AddItem "1969"
            .AddItem "1968"
            .AddItem "1967"
            .AddItem "1966"
            .AddItem "1965"
            .AddItem "1964"
            .AddItem "1963"
            .AddItem "1962"
            .AddItem "1961"
            .AddItem "1960"
            .AddItem "1959"
            .AddItem "1958"
            .AddItem "1957"
            .AddItem "1956"
            .AddItem "1955"
            .AddItem "1954"
            .AddItem "1953"
            .AddItem "1952"
            .AddItem "1951"
            .AddItem "1950"
         End With
      End Sub

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Felipebucaram,

        In the future please only post the code that you think might be the cause of the problem.

        Thanks,

        -Frinny

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          what terrible code is that.

          can't you simply run a loop to add the items you have hard coded ?

          and no one here have time to go through such lengthy code. post something meaningful not all the garbage you have.

          Comment

          Working...