473,763 Members | 7,622 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add Items to a combobox

8 New Member
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!!!!!!!!!!!
Aug 17 '09 #1
4 2363
debasisdas
8,127 Recognized Expert Expert
these are pretty simple task.

kindly post the code that you are working on .
Aug 18 '09 #2
felipebucaram
8 New Member
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):
Expand|Select|Wrap|Line Numbers
  1. Private Sub CANCEL_Click()
  2.    Unload Me
  3.    ActiveDocument.Close SaveChanges:=False
  4. End Sub
  5.  
  6. Private Sub chkCECOES_Click()
  7. If chkCECOES = False Then cboy5.Value = Null Else cboy5.Value = "2009"
  8. If chkCECOES = False Then cbod5.BackColor = &H8000000F
  9. If chkCECOES = False Then cbom5.Enabled = False
  10. If chkCECOES = False Then cbom5.BackColor = &H8000000F
  11. If chkCECOES = False Then cboy5.Enabled = False
  12. If chkCECOES = False Then cboy5.BackColor = &H8000000F
  13. If chkCECOES = True Then cbod5.Enabled = True
  14. If chkCECOES = True Then cbod5.BackColor = &H80000009
  15. If chkCECOES = True Then cbom5.Enabled = True
  16. If chkCECOES = True Then cbom5.BackColor = &H80000009
  17. If chkCECOES = True Then cboy5.Enabled = True
  18. If chkCECOES = True Then cboy5.BackColor = &H80000009
  19. End Sub
  20.  
  21. Private Sub chkCPG_Click()
  22. If chkCPG = False Then cboy6.Value = Null Else cboy6.Value = "2009"
  23. If chkCPG = False Then cbod6.BackColor = &H8000000F
  24. If chkCPG = False Then cbom6.Enabled = False
  25. If chkCPG = False Then cbom6.BackColor = &H8000000F
  26. If chkCPG = False Then cboy6.Enabled = False
  27. If chkCPG = False Then cboy6.BackColor = &H8000000F
  28. If chkCPG = True Then cbod6.Enabled = True
  29. If chkCPG = True Then cbod6.BackColor = &H80000009
  30. If chkCPG = True Then cbom6.Enabled = True
  31. If chkCPG = True Then cbom6.BackColor = &H80000009
  32. If chkCPG = True Then cboy6.Enabled = True
  33. If chkCPG = True Then cboy6.BackColor = &H80000009
  34. End Sub
  35.  
  36. Private Sub chkSRI_Click()
  37. If chkSRI = False Then cboy7.Value = Null Else cboy7.Value = "2009"
  38. If chkSRI = False Then cbod7.Enabled = False
  39. If chkSRI = False Then cbod7.BackColor = &H8000000F
  40. If chkSRI = False Then cbom7.Enabled = False
  41. If chkSRI = False Then cbom7.BackColor = &H8000000F
  42. If chkSRI = False Then cboy7.Enabled = False
  43. If chkSRI = False Then cboy7.BackColor = &H8000000F
  44. If chkSRI = True Then cbod7.Enabled = True
  45. If chkSRI = True Then cbod7.BackColor = &H80000009
  46. If chkSRI = True Then cbom7.Enabled = True
  47. If chkSRI = True Then cbom7.BackColor = &H80000009
  48. If chkSRI = True Then cboy7.Enabled = True
  49. If chkSRI = True Then cboy7.BackColor = &H80000009
  50. End Sub
  51.  
  52.  
  53.  
  54. Private Sub optCODNO_Click()
  55. If optCODNO = True Then cbod5.BackColor = &H8000000F
  56. If optCODNO = True Then cbod5.Enabled = False
  57. If optCODNO = True Then cbom5.BackColor = &H8000000F
  58. If optCODNO = True Then cbom5.Enabled = False
  59. If optCODNO = True Then cboy5.BackColor = &H8000000F
  60. If optCODNO = True Then cboy5.Enabled = False
  61. If optCODNO = True Then chkCECOES.Enabled = False
  62. If optCODNO = True Then chkCECOES.BackColor = &H8000000F
  63. If optCODNO = True Then chkCECOD.Enabled = False
  64. If optCODNO = True Then cbod4.BackColor = &H8000000F
  65. If optCODNO = True Then cbod4.Enabled = False
  66. If optCODNO = True Then cbom4.BackColor = &H8000000F
  67. If optCODNO = True Then cbom4.Enabled = False
  68. If optCODNO = True Then cboy4.BackColor = &H8000000F
  69. If optCODNO = True Then cboy4.Enabled = False
  70. If optCODNO = True Then frmCOD.Visible = False
  71. End Sub
  72.  
  73. Private Sub optCODOTR_Click()
  74. If optCODOTR = True Then chkCECOES.Enabled = True
  75. If optCODOTR = True Then chkCECOD.Enabled = True
  76. If optCODOTR = True Then cbod5.BackColor = &H80000009
  77. If optCODOTR = True Then cbod5.Enabled = True
  78. If optCODOTR = True Then cbom5.BackColor = &H80000009
  79. If optCODOTR = True Then cbom5.Enabled = True
  80. If optCODOTR = True Then cboy5.BackColor = &H80000009
  81. If optCODOTR = True Then cboy5.Enabled = True
  82. If optCODOTR = True Then cbod4.BackColor = &H80000009
  83. If optCODOTR = True Then cbod4.Enabled = True
  84. If optCODOTR = True Then cbom4.BackColor = &H80000009
  85. If optCODOTR = True Then cbom4.Enabled = True
  86. If optCODOTR = True Then cboy4.BackColor = &H80000009
  87. If optCODOTR = True Then cboy4.Enabled = True
  88. If optCODOTR = True Then txtCODCY.Enabled = True
  89. If optCODOTR = True Then txtCODCY.BackColor = &H80000009
  90. If optCODOTR = True Then LBLCODCYCE.Enabled = True
  91. End Sub
  92.  
  93. Private Sub optCODSI_Click()
  94. If optCODSI = True Then cbod5.BackColor = &H80000009
  95. If optCODSI = True Then cbod5.Enabled = True
  96. If optCODSI = True Then cbom5.BackColor = &H80000009
  97. If optCODSI = True Then cbom5.Enabled = True
  98. If optCODSI = True Then cboy5.BackColor = &H80000009
  99. If optCODSI = True Then cboy5.Enabled = True
  100. If optCODSI = True Then chkCECOES.Enabled = True
  101. If optCODSI = True Then chkCECOD.Enabled = True
  102. If optCODSI = True Then chkCECOD.Enabled = True
  103. If optCODSI = True Then cbod4.BackColor = &H80000009
  104. If optCODSI = True Then cbod4.Enabled = True
  105. If optCODSI = True Then cbom4.BackColor = &H80000009
  106. If optCODSI = True Then cbom4.Enabled = True
  107. If optCODSI = True Then cboy4.BackColor = &H80000009
  108. If optCODSI = True Then cboy4.Enabled = True
  109. If optCODSI = True Then frmCOD.Visible = True
  110. End Sub
  111.  
  112. Private Sub optCODSOL_Click()
  113. If optCODSOL = True Then chkCECOES.Enabled = False
  114. If optCODSOL = True Then cbod5.BackColor = &H8000000F
  115. If optCODSOL = True Then cbod5.Enabled = False
  116. If optCODSOL = True Then cbom5.BackColor = &H8000000F
  117. If optCODSOL = True Then cbom5.Enabled = False
  118. If optCODSOL = True Then cboy5.BackColor = &H8000000F
  119. If optCODSOL = True Then cboy5.Enabled = False
  120. If optCODSOL = True Then txtCODCY.Enabled = False
  121. If optCODSOL = True Then LBLCODCYCE.Enabled = False
  122. If optCODSOL = True Then txtCODCY.BackColor = &H8000000F
  123. End Sub
  124.  
  125.  
  126. Private Sub optOTR_Click()
  127. If optOTR = True Then chkCEE.Enabled = True
  128. If optOTR = True Then chkCEE.Enabled = True
  129. If optOTR = True Then cbod3.BackColor = &H80000009
  130. If optOTR = True Then cbod3.Enabled = True
  131. If optOTR = True Then cbom3.BackColor = &H80000009
  132. If optOTR = True Then cbom3.Enabled = True
  133. If optOTR = True Then cboy3.BackColor = &H80000009
  134. If optOTR = True Then cboy3.Enabled = True
  135. If optOTR = True Then NMBCY.Enabled = True
  136. If optOTR = True Then CICY.Enabled = True
  137. If optOTR = True Then lblCY.Enabled = True
  138. If optOTR = True Then lblCICY.Enabled = True
  139. If optOTR = True Then NMBCY.BackColor = &H80000009
  140. If optOTR = True Then CICY.BackColor = &H80000009
  141. If optOTR = True Then lblCY.BackColor = &H8000000F
  142. If optOTR = True Then lblCICY.BackColor = &H8000000F
  143. End Sub
  144.  
  145. Private Sub optSOLT_Click()
  146. If optSOLT = True Then chkCEE.Enabled = False
  147. If optSOLT = True Then chkCEE.BackColor = &H8000000F
  148. If optSOLT = True Then chkCEE.Enabled = False
  149. If optSOLT = True Then cbod3.BackColor = &H8000000F
  150. If optSOLT = True Then cbod3.Enabled = False
  151. If optSOLT = True Then cbom3.BackColor = &H8000000F
  152. If optSOLT = True Then cbom3.Enabled = False
  153. If optSOLT = True Then cboy3.BackColor = &H8000000F
  154. If optSOLT = True Then cboy3.Enabled = False
  155. If optSOLT = True Then CICY.Enabled = False
  156. If optSOLT = True Then NMBCY.BackColor = &H8000000F
  157. If optSOLT = True Then CICY.BackColor = &H8000000F
  158. If optSOLT = True Then lblCY.Enabled = False
  159. If optSOLT = True Then lblCICY.Enabled = False
  160. End Sub
  161. Private Sub cbom4_Change()
  162.  
  163. End Sub
  164.  
  165. Private Sub chkCECOD_Click()
  166. If chkCECOD = False Then cboy4.Value = Null Else cboy4.Value = "2009"
  167. If chkCECOD = False Then cbod4.BackColor = &H8000000F
  168. If chkCECOD = False Then cbom4.Enabled = False
  169. If chkCECOD = False Then cbom4.BackColor = &H8000000F
  170. If chkCECOD = False Then cboy4.Enabled = False
  171. If chkCECOD = False Then cboy4.BackColor = &H8000000F
  172. If chkCECOD = True Then cbod4.Enabled = True
  173. If chkCECOD = True Then cbod4.BackColor = &H80000009
  174. If chkCECOD = True Then cbom4.Enabled = True
  175. If chkCECOD = True Then cbom4.BackColor = &H80000009
  176. If chkCECOD = True Then cboy4.Enabled = True
  177. If chkCECOD = True Then cboy4.BackColor = &H80000009
  178. End Sub
  179.  
  180. Private Sub chkCED_Click()
  181.    If chkCED = False Then cboy2.Value = Null Else cboy2.Value = "2009"
  182.    If chkRUC = False Then cbod1.Enabled = False
  183. If chkCED = False Then cbod2.BackColor = &H8000000F
  184. If chkCED = False Then cbom2.Enabled = False
  185. If chkCED = False Then cbom2.BackColor = &H8000000F
  186. If chkCED = False Then cboy2.Enabled = False
  187. If chkCED = False Then cboy2.BackColor = &H8000000F
  188. If chkCED = True Then cbod2.Enabled = True
  189. If chkCED = True Then cbod2.BackColor = &H80000009
  190. If chkCED = True Then cbom2.Enabled = True
  191. If chkCED = True Then cbom2.BackColor = &H80000009
  192. If chkCED = True Then cboy2.Enabled = True
  193. If chkCED = True Then cboy2.BackColor = &H80000009
  194. End Sub
  195.  
  196. Private Sub chkCEE_Click()
  197. If chkCEE = False Then cboy3.Value = Null Else cboy3.Value = "2009"
  198. If chkCEE = False Then cbod3.Enabled = False
  199. If chkCEE = False Then cbod3.BackColor = &H8000000F
  200. If chkCEE = False Then cbom3.Enabled = False
  201. If chkCEE = False Then cbom3.BackColor = &H8000000F
  202. If chkCEE = False Then cboy3.Enabled = False
  203. If chkCEE = False Then cboy3.BackColor = &H8000000F
  204. If chkCEE = True Then cbod3.Enabled = True
  205. If chkCEE = True Then cbod3.BackColor = &H80000009
  206. If chkCEE = True Then cbom3.Enabled = True
  207. If chkCEE = True Then cbom3.BackColor = &H80000009
  208. If chkCEE = True Then cboy3.Enabled = True
  209. If chkCEE = True Then cboy3.BackColor = &H80000009
  210. End Sub
  211.  
  212. Private Sub chkRUC_Click()
  213. If chkRUC = False Then cboy1.Value = Null Else cboy1.Value = "2009"
  214. If chkRUC = False Then cbod1.Enabled = False
  215. If chkRUC = False Then cbod1.BackColor = &H8000000F
  216. If chkRUC = False Then cbom1.Enabled = False
  217. If chkRUC = False Then cbom1.BackColor = &H8000000F
  218. If chkRUC = False Then cboy1.Enabled = False
  219. If chkRUC = False Then cboy1.BackColor = &H8000000F
  220. If chkRUC = True Then cbod1.Enabled = True
  221. If chkRUC = True Then cbod1.BackColor = &H80000009
  222. If chkRUC = True Then cbom1.Enabled = True
  223. If chkRUC = True Then cbom1.BackColor = &H80000009
  224. If chkRUC = True Then cboy1.Enabled = True
  225. If chkRUC = True Then cboy1.BackColor = &H80000009
  226. End Sub
  227.  
  228. Private Sub CLEAR_Click()
  229.    SEC.Value = Null
  230.    PLZ.Value = Null
  231.    MNT.Value = Null
  232.    CI.Value = Null
  233.    ACT.Value = Null
  234.    NMB.Value = Null
  235.    NMBCY.Value = Null
  236.    CICY.Value = Null
  237.    cbod1.Value = Null
  238.    cbom1.Value = Null
  239.    cboy1.Value = Null
  240.    cboDEST.Value = "AF y CT"
  241.  
  242. End Sub
  243.  
  244.  
  245. Private Sub OK_Click()
  246.  
  247.              '--------  DOCUMENTOS  ---------
  248.  
  249. 'OCTAVA LINEA (CPG)
  250. Dim strCPG  As String
  251. If chkCECOD = False Then strCPG = Space(1)
  252.  
  253. With ActiveDocument
  254.     .Bookmarks("CPG").Range.Text = strCPG
  255.     .Bookmarks("d8").Range.Text = cbod8.Value
  256.     .Bookmarks("m8").Range.Text = cbom8.Value
  257.     .Bookmarks("y8").Range.Text = cboy8.Value
  258.  
  259. 'SEPTIMA LINEA (SRI)
  260. Dim strSRI  As String
  261. If chkSRI = False Then strSRI = Space(1)
  262.  
  263. With ActiveDocument
  264.     .Bookmarks("IES").Range.Text = strSRI
  265.     .Bookmarks("d7").Range.Text = cbod7.Value
  266.     .Bookmarks("m7").Range.Text = cbom7.Value
  267.     .Bookmarks("y7").Range.Text = cboy7.Value
  268.     End With
  269.  
  270. 'SEXTA LINEA (IESS)
  271.  
  272. Dim strIES  As String
  273. If chkIES = False Then strIES = Space(1)
  274.  
  275. With ActiveDocument
  276.     .Bookmarks("IES").Range.Text = strIES
  277.     .Bookmarks("d6").Range.Text = cbod5.Value
  278.     .Bookmarks("m6").Range.Text = cbom5.Value
  279.     .Bookmarks("y6").Range.Text = cboy5.Value
  280.     End With
  281.  
  282. 'QUINTA LINEA (CONYUGE CODEUDOR)
  283.  
  284. Dim strCECODES  As String
  285. If chkCECOD = False Then strCECODES = Space(1)
  286.  
  287. With ActiveDocument
  288.     .Bookmarks("CECOES").Range.Text = strCECODES
  289.     .Bookmarks("NMBCOES").Range.Text = txtCODCY
  290.     .Bookmarks("d5").Range.Text = cbod5.Value
  291.     .Bookmarks("m5").Range.Text = cbom5.Value
  292.     .Bookmarks("y5").Range.Text = cboy5.Value
  293.     End With
  294.  
  295. 'CUARTA LINEA (CI CODEUDOR)
  296. Dim strCECOD As String
  297. If chkCECOD = False Then strCECOD = Space(1)
  298.  
  299.  
  300. With ActiveDocument
  301.     .Bookmarks("CECOD").Range.Text = strCECOD
  302.     .Bookmarks("NMBCO").Range.Text = txtCOD.Value
  303.     .Bookmarks("d4").Range.Text = cbod4.Value
  304.     .Bookmarks("m4").Range.Text = cbom4.Value
  305.     .Bookmarks("y4").Range.Text = cboy4.Value
  306. End With
  307.  
  308.  
  309. 'TERCERA LINEA (CI CONYUGE DEUDOR)
  310. Dim strCEE As String
  311. If chkCEE = False Then strCEE = Space(1)
  312.  
  313. With ActiveDocument
  314.     .Bookmarks("CEE").Range.Text = strCEE
  315.     .Bookmarks("NMBCY3").Range.Text = NMBCY.Value
  316.     .Bookmarks("d3").Range.Text = cbod3.Value
  317.     .Bookmarks("m3").Range.Text = cbom3.Value
  318.     .Bookmarks("y3").Range.Text = cboy3.Value
  319. End With
  320.  
  321. 'SEGUNDA LINEA (CI DEUDOR)
  322. Dim strCED As String
  323. If chkCED = False Then strCED = Space(1)
  324.  
  325. With ActiveDocument
  326.     .Bookmarks("CED").Range.Text = strCED
  327.     .Bookmarks("NMB2").Range.Text = NMB.Value
  328.     .Bookmarks("d2").Range.Text = cbod2.Value
  329.     .Bookmarks("m2").Range.Text = cbom2.Value
  330.     .Bookmarks("y2").Range.Text = cboy2.Value
  331. End With
  332.  
  333. 'PRIMERA LINEA (RUC)
  334. Dim strRUC As String
  335. If chkRUC = False Then strRUC = Space(1)
  336.  
  337. With ActiveDocument
  338.       .Bookmarks("RUC").Range.Text = strRUC
  339.       .Bookmarks("d1").Range.Text = cbod1.Value
  340.       .Bookmarks("m1").Range.Text = cbom1.Value
  341.       .Bookmarks("y1").Range.Text = cboy1.Value
  342. End With
  343.  
  344.                                  '------ INFO --------
  345. 'DESTINO
  346. Dim strDEST As String
  347. If cboDEST = "AF y CT" Then strDEST = "ACTIVO FIJO y CAPITAL DE TRABAJO"
  348. If cboDEST = "AF" Then strDEST = "ACTIVO FIJO"
  349. If cboDEST = "CT" Then strDEST = "CAPITAL DE TRABAJO"
  350.  
  351.  
  352. With ActiveDocument
  353.       'SECTOR
  354.       .Bookmarks("SEC").Range.Text = SEC.Value
  355.       'MONTO
  356.       .Bookmarks("MNT").Range.Text = MNT.Value
  357.       'PLAZO
  358.       .Bookmarks("PLZ").Range.Text = PLZ.Value
  359.       'NUMERO DE CI
  360.       .Bookmarks("CI").Range.Text = CI.Value
  361.       'ACTIVIDAD
  362.       .Bookmarks("ACT").Range.Text = ACT.Value
  363.       'DEUDOR
  364.       .Bookmarks("NMB").Range.Text = NMB.Value
  365.       .Bookmarks("NMB0").Range.Text = NMB.Value
  366.       .Bookmarks("NMB00").Range.Text = NMB.Value
  367.       'CONYUGE DEL DEUDOR
  368.       .Bookmarks("NMBCY").Range.Text = NMBCY.Value
  369.     End With
  370.  
  371.        Dim strSOLT As String
  372.        If optSOLT = True Then strSOLT = "SOLTERO(A)"
  373.  
  374.        ActiveDocument.Bookmarks("NMBCY").Range.Text = strSOLT
  375.        'CEDULA DEL CONYUGE
  376.       .Bookmarks("CICY").Range.Text = CICY.Value
  377.  
  378.       Dim strCICY As String
  379.       If optSOLT = True Then strCICY = "----------"
  380.  
  381.       ActiveDocument.Bookmarks("CICY").Range.Text = strCICY
  382.        'DESTINO
  383.       .Bookmarks("DES").Range.Text = strDEST
  384.  
  385.    End With
  386.         Application.ScreenUpdating = True
  387.         Unload Me
  388.  
  389.  
  390.    End Sub
  391.         'RESET
  392. Private Sub reset_Click()
  393.    SEC.Value = Null
  394.    PLZ.Value = Null
  395.    MNT.Value = Null
  396.    ACT.Value = Null
  397.    NMB.Value = Null
  398.    cbod1.Value = Null
  399.    cbom1.Value = Null
  400.    cboy1.Value = "2009"
  401.    SEC.Value = "Guayaquil"
  402.    CI.Value = "001"
  403.    NMBCY.Value = Null
  404.    CICY.Value = Null
  405.    cboDEST.Value = "AF y CT"
  406. End Sub
  407.  
  408.  
  409.  
  410. Private Sub SpinButton1_Change()
  411.  
  412. End Sub
  413.  
  414. Private Sub scrHIP1_Change()
  415.  
  416. If scrHIP1.Value = 1 Then frmHIP1.Visible = True
  417. If scrHIP1.Value = 1 Then frmHIP2.Visible = False
  418. If scrHIP1.Value = 1 Then frmHIP3.Visible = False
  419. If scrHIP1.Value = 1 Then frmHIP4.Visible = False
  420. If scrHIP1.Value = 1 Then frmHIP5.Visible = False
  421.  
  422. If scrHIP1.Value = 2 Then frmHIP1.Visible = False
  423. If scrHIP1.Value = 2 Then frmHIP2.Visible = True
  424. If scrHIP1.Value = 2 Then frmHIP3.Visible = False
  425. If scrHIP1.Value = 2 Then frmHIP4.Visible = False
  426. If scrHIP1.Value = 2 Then frmHIP5.Visible = False
  427.  
  428. If scrHIP1.Value = 3 Then frmHIP1.Visible = False
  429. If scrHIP1.Value = 3 Then frmHIP2.Visible = False
  430. If scrHIP1.Value = 3 Then frmHIP3.Visible = True
  431. If scrHIP1.Value = 3 Then frmHIP4.Visible = False
  432. If scrHIP1.Value = 3 Then frmHIP5.Visible = False
  433.  
  434. If scrHIP1.Value = 4 Then frmHIP1.Visible = False
  435. If scrHIP1.Value = 4 Then frmHIP2.Visible = False
  436. If scrHIP1.Value = 4 Then frmHIP3.Visible = False
  437. If scrHIP1.Value = 4 Then frmHIP4.Visible = True
  438. If scrHIP1.Value = 4 Then frmHIP5.Visible = False
  439.  
  440. If scrHIP1.Value = 5 Then frmHIP1.Visible = False
  441. If scrHIP1.Value = 5 Then frmHIP2.Visible = False
  442. If scrHIP1.Value = 5 Then frmHIP3.Visible = False
  443. If scrHIP1.Value = 5 Then frmHIP4.Visible = False
  444. If scrHIP1.Value = 5 Then frmHIP5.Visible = True
  445.  
  446. End Sub
  447.  
  448. Private Sub txtHIP1_Change()
  449.  
  450. End Sub
  451.  
  452. Private Sub txtING1_Change()
  453.  
  454. End Sub
  455.  
  456. Private Sub txtNUMVIN_Change()
  457. If txtNUMVIN.Text = "" Then frmVINCU1.Visible = False
  458. If txtNUMVIN.Text = "" Then frmVINCU1.Enabled = False
  459. If txtNUMVIN.Text = "" Then frmVINCU2.Visible = False
  460. If txtNUMVIN.Text = "" Then frmVINCU2.Enabled = False
  461. If txtNUMVIN.Text = "" Then frmVINCU3.Visible = False
  462. If txtNUMVIN.Text = "" Then frmVINCU3.Enabled = False
  463.  
  464. If txtNUMVIN.Text = "1" Then frmVINCU1.Visible = True
  465. If txtNUMVIN.Text = "1" Then frmVINCU1.Enabled = True
  466. If txtNUMVIN.Text = "1" Then frmVINCU2.Visible = False
  467. If txtNUMVIN.Text = "1" Then frmVINCU2.Enabled = False
  468. If txtNUMVIN.Text = "1" Then frmVINCU3.Visible = False
  469. If txtNUMVIN.Text = "1" Then frmVINCU3.Enabled = False
  470.  
  471. If txtNUMVIN.Text = "2" Then frmVINCU1.Visible = True
  472. If txtNUMVIN.Text = "2" Then frmVINCU1.Enabled = True
  473. If txtNUMVIN.Text = "2" Then frmVINCU2.Visible = True
  474. If txtNUMVIN.Text = "2" Then frmVINCU2.Enabled = True
  475. If txtNUMVIN.Text = "2" Then frmVINCU3.Visible = False
  476. If txtNUMVIN.Text = "2" Then frmVINCU3.Enabled = False
  477.  
  478. If txtNUMVIN.Text = "3" Then frmVINCU1.Visible = True
  479. If txtNUMVIN.Text = "3" Then frmVINCU1.Enabled = True
  480. If txtNUMVIN.Text = "3" Then frmVINCU2.Visible = True
  481. If txtNUMVIN.Text = "3" Then frmVINCU2.Enabled = True
  482. If txtNUMVIN.Text = "3" Then frmVINCU3.Visible = True
  483. If txtNUMVIN.Text = "3" Then frmVINCU3.Enabled = True
  484. End Sub
  485.  
  486. Private Sub txtNUMING_Change()
  487.  
  488. If txtNUMING.Text = "" Then frmINGRESOS1.Visible = False
  489. If txtNUMING.Text = "" Then frmINGRESOS1.Enabled = False
  490. If txtNUMING.Text = "" Then frmINGRESOS2.Visible = False
  491. If txtNUMING.Text = "" Then frmINGRESOS2.Enabled = False
  492. If txtNUMING.Text = "" Then frmINGRESOS3.Visible = False
  493. If txtNUMING.Text = "" Then frmINGRESOS3.Enabled = False
  494.  
  495. If txtNUMING.Text = "1" Then frmINGRESOS1.Visible = True
  496. If txtNUMING.Text = "1" Then frmINGRESOS1.Enabled = True
  497. If txtNUMING.Text = "1" Then frmINGRESOS2.Visible = False
  498. If txtNUMING.Text = "1" Then frmINGRESOS2.Enabled = False
  499. If txtNUMING.Text = "1" Then frmINGRESOS3.Visible = False
  500. If txtNUMING.Text = "1" Then frmINGRESOS3.Enabled = False
  501.  
  502. If txtNUMING.Text = "2" Then frmINGRESOS1.Visible = True
  503. If txtNUMING.Text = "2" Then frmINGRESOS1.Enabled = True
  504. If txtNUMING.Text = "2" Then frmINGRESOS2.Visible = True
  505. If txtNUMING.Text = "2" Then frmINGRESOS2.Enabled = True
  506. If txtNUMING.Text = "2" Then frmINGRESOS3.Visible = False
  507. If txtNUMING.Text = "2" Then frmINGRESOS3.Enabled = False
  508.  
  509. If txtNUMING.Text = "3" Then frmINGRESOS1.Visible = True
  510. If txtNUMING.Text = "3" Then frmINGRESOS1.Enabled = True
  511. If txtNUMING.Text = "3" Then frmINGRESOS2.Visible = True
  512. If txtNUMING.Text = "3" Then frmINGRESOS2.Enabled = True
  513. If txtNUMING.Text = "3" Then frmINGRESOS3.Visible = True
  514. If txtNUMING.Text = "3" Then frmINGRESOS3.Enabled = True
  515.  
  516.  
  517. End Sub
  518.  
  519. Private Sub txtNUMING_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
  520. If KeyAscii >= 49 And KeyAscii <= 51 Then
  521.   Exit Sub
  522. Else
  523.   KeyAscii = 0
  524.   Beep
  525.   MsgBox "Màx 3"
  526.  
  527. End If
  528.  
  529. End Sub
  530.  
  531.  
  532.  ' ---- INICIO  ----
  533. Private Sub UserForm_Initialize()
  534.  
  535. cboING1.AddItem "456"
  536.  
  537.  
  538.  
  539. frmHIP1.Visible = True
  540. frmHIP2.Visible = False
  541. frmHIP3.Visible = False
  542. frmHIP4.Visible = False
  543. frmHIP5.Visible = False
  544. scrHIP1.Value = 1
  545.  
  546. cbod7.Enabled = False
  547. cbod7.BackColor = &H8000000F
  548. cbom7.Enabled = False
  549. cbom7.BackColor = &H8000000F
  550. cboy7.Enabled = False
  551. cboy7.BackColor = &H8000000F
  552.  
  553.     'POR DEFAULT
  554. SEC.Value = "Guayaquil"
  555. CI.Value = "001"
  556. cboDEST.Value = "AF y CT"
  557.  
  558. 'OPTIONBOXES
  559. optSOLT.Value = True
  560. optCODNO.Value = True
  561. optCODSOL.Value = True
  562.  
  563. 'CHECKBOXES
  564. chkRUC.Value = True
  565. chkSRI.Value = False
  566. chkCED.Value = True
  567. chkCPG.Value = True
  568. chkIES.Value = True
  569.  
  570. 'COMBOBOXES
  571. cboy1.Value = "2009"
  572. cboy2.Value = "2009"
  573. cboy3.Value = "2009"
  574. cboy4.Value = "2009"
  575. cboy5.Value = "2009"
  576. cboy6.Value = "2009"
  577. cboy7.Value = "2009"
  578. cboy8.Value = "2009"
  579.  
  580.    'COMBOBOXES INFO
  581.    With cboDEST
  582.       .AddItem "AF"
  583.       .AddItem "CT"
  584.       .AddItem "AF y CT"
  585. End With
  586.  
  587. With cbod8
  588.       .AddItem "01"
  589.       .AddItem "02"
  590.       .AddItem "03"
  591.       .AddItem "04"
  592.       .AddItem "05"
  593.       .AddItem "06"
  594.       .AddItem "07"
  595.       .AddItem "08"
  596.       .AddItem "09"
  597.       .AddItem "10"
  598.       .AddItem "11"
  599.       .AddItem "12"
  600.       .AddItem "13"
  601.       .AddItem "14"
  602.       .AddItem "15"
  603.       .AddItem "15"
  604.       .AddItem "16"
  605.       .AddItem "17"
  606.       .AddItem "18"
  607.       .AddItem "19"
  608.       .AddItem "20"
  609.       .AddItem "21"
  610.       .AddItem "22"
  611.       .AddItem "23"
  612.       .AddItem "24"
  613.       .AddItem "25"
  614.       .AddItem "26"
  615.       .AddItem "27"
  616.       .AddItem "28"
  617.       .AddItem "29"
  618.       .AddItem "30"
  619.       .AddItem "31"
  620.    End With
  621.  
  622.    With cbom8
  623.       .AddItem "01"
  624.       .AddItem "02"
  625.       .AddItem "03"
  626.       .AddItem "04"
  627.       .AddItem "05"
  628.       .AddItem "06"
  629.       .AddItem "07"
  630.       .AddItem "08"
  631.       .AddItem "09"
  632.       .AddItem "10"
  633.       .AddItem "11"
  634.       .AddItem "12"
  635.    End With
  636.  
  637.    With cboy8
  638.       .AddItem "2011"
  639.       .AddItem "2010"
  640.       .AddItem "2009"
  641.       .AddItem "2008"
  642.       .AddItem "2007"
  643.       .AddItem "2006"
  644.       .AddItem "2005"
  645.       .AddItem "2004"
  646.       .AddItem "2003"
  647.       .AddItem "2002"
  648.       .AddItem "2001"
  649.       .AddItem "2000"
  650.       .AddItem "1999"
  651.       .AddItem "1997"
  652.       .AddItem "1996"
  653.       .AddItem "1995"
  654.       .AddItem "1994"
  655.       .AddItem "1993"
  656.       .AddItem "1992"
  657.       .AddItem "1991"
  658.       .AddItem "1990"
  659.       .AddItem "1989"
  660.       .AddItem "1988"
  661.       .AddItem "1987"
  662.       .AddItem "1986"
  663.       .AddItem "1985"
  664.       .AddItem "1984"
  665.       .AddItem "1983"
  666.       .AddItem "1982"
  667.       .AddItem "1981"
  668.       .AddItem "1980"
  669.       .AddItem "1979"
  670.       .AddItem "1978"
  671.       .AddItem "1977"
  672.       .AddItem "1976"
  673.       .AddItem "1975"
  674.       .AddItem "1974"
  675.       .AddItem "1973"
  676.       .AddItem "1972"
  677.       .AddItem "1971"
  678.       .AddItem "1970"
  679.       .AddItem "1969"
  680.       .AddItem "1968"
  681.       .AddItem "1967"
  682.       .AddItem "1966"
  683.       .AddItem "1965"
  684.       .AddItem "1964"
  685.       .AddItem "1963"
  686.       .AddItem "1962"
  687.       .AddItem "1961"
  688.       .AddItem "1960"
  689.       .AddItem "1959"
  690.       .AddItem "1958"
  691.       .AddItem "1957"
  692.       .AddItem "1956"
  693.       .AddItem "1955"
  694.       .AddItem "1954"
  695.       .AddItem "1953"
  696.       .AddItem "1952"
  697.       .AddItem "1951"
  698.       .AddItem "1950"
  699.    End With
  700.  
  701. With cbod7
  702.       .AddItem "01"
  703.       .AddItem "02"
  704.       .AddItem "03"
  705.       .AddItem "04"
  706.       .AddItem "05"
  707.       .AddItem "06"
  708.       .AddItem "07"
  709.       .AddItem "08"
  710.       .AddItem "09"
  711.       .AddItem "10"
  712.       .AddItem "11"
  713.       .AddItem "12"
  714.       .AddItem "13"
  715.       .AddItem "14"
  716.       .AddItem "15"
  717.       .AddItem "15"
  718.       .AddItem "16"
  719.       .AddItem "17"
  720.       .AddItem "18"
  721.       .AddItem "19"
  722.       .AddItem "20"
  723.       .AddItem "21"
  724.       .AddItem "22"
  725.       .AddItem "23"
  726.       .AddItem "24"
  727.       .AddItem "25"
  728.       .AddItem "26"
  729.       .AddItem "27"
  730.       .AddItem "28"
  731.       .AddItem "29"
  732.       .AddItem "30"
  733.       .AddItem "31"
  734.    End With
  735.  
  736.    With cbom7
  737.       .AddItem "01"
  738.       .AddItem "02"
  739.       .AddItem "03"
  740.       .AddItem "04"
  741.       .AddItem "05"
  742.       .AddItem "06"
  743.       .AddItem "07"
  744.       .AddItem "08"
  745.       .AddItem "09"
  746.       .AddItem "10"
  747.       .AddItem "11"
  748.       .AddItem "12"
  749.    End With
  750.  
  751.    With cboy7
  752.       .AddItem "2011"
  753.       .AddItem "2010"
  754.       .AddItem "2009"
  755.       .AddItem "2008"
  756.       .AddItem "2007"
  757.       .AddItem "2006"
  758.       .AddItem "2005"
  759.       .AddItem "2004"
  760.       .AddItem "2003"
  761.       .AddItem "2002"
  762.       .AddItem "2001"
  763.       .AddItem "2000"
  764.       .AddItem "1999"
  765.       .AddItem "1997"
  766.       .AddItem "1996"
  767.       .AddItem "1995"
  768.       .AddItem "1994"
  769.       .AddItem "1993"
  770.       .AddItem "1992"
  771.       .AddItem "1991"
  772.       .AddItem "1990"
  773.       .AddItem "1989"
  774.       .AddItem "1988"
  775.       .AddItem "1987"
  776.       .AddItem "1986"
  777.       .AddItem "1985"
  778.       .AddItem "1984"
  779.       .AddItem "1983"
  780.       .AddItem "1982"
  781.       .AddItem "1981"
  782.       .AddItem "1980"
  783.       .AddItem "1979"
  784.       .AddItem "1978"
  785.       .AddItem "1977"
  786.       .AddItem "1976"
  787.       .AddItem "1975"
  788.       .AddItem "1974"
  789.       .AddItem "1973"
  790.       .AddItem "1972"
  791.       .AddItem "1971"
  792.       .AddItem "1970"
  793.       .AddItem "1969"
  794.       .AddItem "1968"
  795.       .AddItem "1967"
  796.       .AddItem "1966"
  797.       .AddItem "1965"
  798.       .AddItem "1964"
  799.       .AddItem "1963"
  800.       .AddItem "1962"
  801.       .AddItem "1961"
  802.       .AddItem "1960"
  803.       .AddItem "1959"
  804.       .AddItem "1958"
  805.       .AddItem "1957"
  806.       .AddItem "1956"
  807.       .AddItem "1955"
  808.       .AddItem "1954"
  809.       .AddItem "1953"
  810.       .AddItem "1952"
  811.       .AddItem "1951"
  812.       .AddItem "1950"
  813.    End With
  814.  
  815. With cbod6
  816.       .AddItem "01"
  817.       .AddItem "02"
  818.       .AddItem "03"
  819.       .AddItem "04"
  820.       .AddItem "05"
  821.       .AddItem "06"
  822.       .AddItem "07"
  823.       .AddItem "08"
  824.       .AddItem "09"
  825.       .AddItem "10"
  826.       .AddItem "11"
  827.       .AddItem "12"
  828.       .AddItem "13"
  829.       .AddItem "14"
  830.       .AddItem "15"
  831.       .AddItem "15"
  832.       .AddItem "16"
  833.       .AddItem "17"
  834.       .AddItem "18"
  835.       .AddItem "19"
  836.       .AddItem "20"
  837.       .AddItem "21"
  838.       .AddItem "22"
  839.       .AddItem "23"
  840.       .AddItem "24"
  841.       .AddItem "25"
  842.       .AddItem "26"
  843.       .AddItem "27"
  844.       .AddItem "28"
  845.       .AddItem "29"
  846.       .AddItem "30"
  847.       .AddItem "31"
  848.    End With
  849.  
  850.    With cbom6
  851.       .AddItem "01"
  852.       .AddItem "02"
  853.       .AddItem "03"
  854.       .AddItem "04"
  855.       .AddItem "05"
  856.       .AddItem "06"
  857.       .AddItem "07"
  858.       .AddItem "08"
  859.       .AddItem "09"
  860.       .AddItem "10"
  861.       .AddItem "11"
  862.       .AddItem "12"
  863.    End With
  864.  
  865.    With cboy6
  866.       .AddItem "2011"
  867.       .AddItem "2010"
  868.       .AddItem "2009"
  869.       .AddItem "2008"
  870.       .AddItem "2007"
  871.       .AddItem "2006"
  872.       .AddItem "2005"
  873.       .AddItem "2004"
  874.       .AddItem "2003"
  875.       .AddItem "2002"
  876.       .AddItem "2001"
  877.       .AddItem "2000"
  878.       .AddItem "1999"
  879.       .AddItem "1997"
  880.       .AddItem "1996"
  881.       .AddItem "1995"
  882.       .AddItem "1994"
  883.       .AddItem "1993"
  884.       .AddItem "1992"
  885.       .AddItem "1991"
  886.       .AddItem "1990"
  887.       .AddItem "1989"
  888.       .AddItem "1988"
  889.       .AddItem "1987"
  890.       .AddItem "1986"
  891.       .AddItem "1985"
  892.       .AddItem "1984"
  893.       .AddItem "1983"
  894.       .AddItem "1982"
  895.       .AddItem "1981"
  896.       .AddItem "1980"
  897.       .AddItem "1979"
  898.       .AddItem "1978"
  899.       .AddItem "1977"
  900.       .AddItem "1976"
  901.       .AddItem "1975"
  902.       .AddItem "1974"
  903.       .AddItem "1973"
  904.       .AddItem "1972"
  905.       .AddItem "1971"
  906.       .AddItem "1970"
  907.       .AddItem "1969"
  908.       .AddItem "1968"
  909.       .AddItem "1967"
  910.       .AddItem "1966"
  911.       .AddItem "1965"
  912.       .AddItem "1964"
  913.       .AddItem "1963"
  914.       .AddItem "1962"
  915.       .AddItem "1961"
  916.       .AddItem "1960"
  917.       .AddItem "1959"
  918.       .AddItem "1958"
  919.       .AddItem "1957"
  920.       .AddItem "1956"
  921.       .AddItem "1955"
  922.       .AddItem "1954"
  923.       .AddItem "1953"
  924.       .AddItem "1952"
  925.       .AddItem "1951"
  926.       .AddItem "1950"
  927.    End With
  928.  
  929. With cbod1
  930.       .AddItem "01"
  931.       .AddItem "02"
  932.       .AddItem "03"
  933.       .AddItem "04"
  934.       .AddItem "05"
  935.       .AddItem "06"
  936.       .AddItem "07"
  937.       .AddItem "08"
  938.       .AddItem "09"
  939.       .AddItem "10"
  940.       .AddItem "11"
  941.       .AddItem "12"
  942.       .AddItem "13"
  943.       .AddItem "14"
  944.       .AddItem "15"
  945.       .AddItem "15"
  946.       .AddItem "16"
  947.       .AddItem "17"
  948.       .AddItem "18"
  949.       .AddItem "19"
  950.       .AddItem "20"
  951.       .AddItem "21"
  952.       .AddItem "22"
  953.       .AddItem "23"
  954.       .AddItem "24"
  955.       .AddItem "25"
  956.       .AddItem "26"
  957.       .AddItem "27"
  958.       .AddItem "28"
  959.       .AddItem "29"
  960.       .AddItem "30"
  961.       .AddItem "31"
  962.    End With
  963.  
  964. With cbod5
  965.       .AddItem "01"
  966.       .AddItem "02"
  967.       .AddItem "03"
  968.       .AddItem "04"
  969.       .AddItem "05"
  970.       .AddItem "06"
  971.       .AddItem "07"
  972.       .AddItem "08"
  973.       .AddItem "09"
  974.       .AddItem "10"
  975.       .AddItem "11"
  976.       .AddItem "12"
  977.       .AddItem "13"
  978.       .AddItem "14"
  979.       .AddItem "15"
  980.       .AddItem "15"
  981.       .AddItem "16"
  982.       .AddItem "17"
  983.       .AddItem "18"
  984.       .AddItem "19"
  985.       .AddItem "20"
  986.       .AddItem "21"
  987.       .AddItem "22"
  988.       .AddItem "23"
  989.       .AddItem "24"
  990.       .AddItem "25"
  991.       .AddItem "26"
  992.       .AddItem "27"
  993.       .AddItem "28"
  994.       .AddItem "29"
  995.       .AddItem "30"
  996.       .AddItem "31"
  997.    End With
  998.  
  999.    With cbom5
  1000.       .AddItem "01"
  1001.       .AddItem "02"
  1002.       .AddItem "03"
  1003.       .AddItem "04"
  1004.       .AddItem "05"
  1005.       .AddItem "06"
  1006.       .AddItem "07"
  1007.       .AddItem "08"
  1008.       .AddItem "09"
  1009.       .AddItem "10"
  1010.       .AddItem "11"
  1011.       .AddItem "12"
  1012.    End With
  1013.  
  1014.    With cboy5
  1015.       .AddItem "2011"
  1016.       .AddItem "2010"
  1017.       .AddItem "2009"
  1018.       .AddItem "2008"
  1019.       .AddItem "2007"
  1020.       .AddItem "2006"
  1021.       .AddItem "2005"
  1022.       .AddItem "2004"
  1023.       .AddItem "2003"
  1024.       .AddItem "2002"
  1025.       .AddItem "2001"
  1026.       .AddItem "2000"
  1027.       .AddItem "1999"
  1028.       .AddItem "1997"
  1029.       .AddItem "1996"
  1030.       .AddItem "1995"
  1031.       .AddItem "1994"
  1032.       .AddItem "1993"
  1033.       .AddItem "1992"
  1034.       .AddItem "1991"
  1035.       .AddItem "1990"
  1036.       .AddItem "1989"
  1037.       .AddItem "1988"
  1038.       .AddItem "1987"
  1039.       .AddItem "1986"
  1040.       .AddItem "1985"
  1041.       .AddItem "1984"
  1042.       .AddItem "1983"
  1043.       .AddItem "1982"
  1044.       .AddItem "1981"
  1045.       .AddItem "1980"
  1046.       .AddItem "1979"
  1047.       .AddItem "1978"
  1048.       .AddItem "1977"
  1049.       .AddItem "1976"
  1050.       .AddItem "1975"
  1051.       .AddItem "1974"
  1052.       .AddItem "1973"
  1053.       .AddItem "1972"
  1054.       .AddItem "1971"
  1055.       .AddItem "1970"
  1056.       .AddItem "1969"
  1057.       .AddItem "1968"
  1058.       .AddItem "1967"
  1059.       .AddItem "1966"
  1060.       .AddItem "1965"
  1061.       .AddItem "1964"
  1062.       .AddItem "1963"
  1063.       .AddItem "1962"
  1064.       .AddItem "1961"
  1065.       .AddItem "1960"
  1066.       .AddItem "1959"
  1067.       .AddItem "1958"
  1068.       .AddItem "1957"
  1069.       .AddItem "1956"
  1070.       .AddItem "1955"
  1071.       .AddItem "1954"
  1072.       .AddItem "1953"
  1073.       .AddItem "1952"
  1074.       .AddItem "1951"
  1075.       .AddItem "1950"
  1076.    End With
  1077.  
  1078. With cbod1
  1079.       .AddItem "01"
  1080.       .AddItem "02"
  1081.       .AddItem "03"
  1082.       .AddItem "04"
  1083.       .AddItem "05"
  1084.       .AddItem "06"
  1085.       .AddItem "07"
  1086.       .AddItem "08"
  1087.       .AddItem "09"
  1088.       .AddItem "10"
  1089.       .AddItem "11"
  1090.       .AddItem "12"
  1091.       .AddItem "13"
  1092.       .AddItem "14"
  1093.       .AddItem "15"
  1094.       .AddItem "15"
  1095.       .AddItem "16"
  1096.       .AddItem "17"
  1097.       .AddItem "18"
  1098.       .AddItem "19"
  1099.       .AddItem "20"
  1100.       .AddItem "21"
  1101.       .AddItem "22"
  1102.       .AddItem "23"
  1103.       .AddItem "24"
  1104.       .AddItem "25"
  1105.       .AddItem "26"
  1106.       .AddItem "27"
  1107.       .AddItem "28"
  1108.       .AddItem "29"
  1109.       .AddItem "30"
  1110.       .AddItem "31"
  1111.    End With
  1112.  
  1113. With cbod3
  1114.       .AddItem "01"
  1115.       .AddItem "02"
  1116.       .AddItem "03"
  1117.       .AddItem "04"
  1118.       .AddItem "05"
  1119.       .AddItem "06"
  1120.       .AddItem "07"
  1121.       .AddItem "08"
  1122.       .AddItem "09"
  1123.       .AddItem "10"
  1124.       .AddItem "11"
  1125.       .AddItem "12"
  1126.       .AddItem "13"
  1127.       .AddItem "14"
  1128.       .AddItem "15"
  1129.       .AddItem "15"
  1130.       .AddItem "16"
  1131.       .AddItem "17"
  1132.       .AddItem "18"
  1133.       .AddItem "19"
  1134.       .AddItem "20"
  1135.       .AddItem "21"
  1136.       .AddItem "22"
  1137.       .AddItem "23"
  1138.       .AddItem "24"
  1139.       .AddItem "25"
  1140.       .AddItem "26"
  1141.       .AddItem "27"
  1142.       .AddItem "28"
  1143.       .AddItem "29"
  1144.       .AddItem "30"
  1145.       .AddItem "31"
  1146.    End With
  1147.  
  1148.    With cbom3
  1149.       .AddItem "01"
  1150.       .AddItem "02"
  1151.       .AddItem "03"
  1152.       .AddItem "04"
  1153.       .AddItem "05"
  1154.       .AddItem "06"
  1155.       .AddItem "07"
  1156.       .AddItem "08"
  1157.       .AddItem "09"
  1158.       .AddItem "10"
  1159.       .AddItem "11"
  1160.       .AddItem "12"
  1161.    End With
  1162.  
  1163.    With cboy3
  1164.       .AddItem "2011"
  1165.       .AddItem "2010"
  1166.       .AddItem "2009"
  1167.       .AddItem "2008"
  1168.       .AddItem "2007"
  1169.       .AddItem "2006"
  1170.       .AddItem "2005"
  1171.       .AddItem "2004"
  1172.       .AddItem "2003"
  1173.       .AddItem "2002"
  1174.       .AddItem "2001"
  1175.       .AddItem "2000"
  1176.       .AddItem "1999"
  1177.       .AddItem "1997"
  1178.       .AddItem "1996"
  1179.       .AddItem "1995"
  1180.       .AddItem "1994"
  1181.       .AddItem "1993"
  1182.       .AddItem "1992"
  1183.       .AddItem "1991"
  1184.       .AddItem "1990"
  1185.       .AddItem "1989"
  1186.       .AddItem "1988"
  1187.       .AddItem "1987"
  1188.       .AddItem "1986"
  1189.       .AddItem "1985"
  1190.       .AddItem "1984"
  1191.       .AddItem "1983"
  1192.       .AddItem "1982"
  1193.       .AddItem "1981"
  1194.       .AddItem "1980"
  1195.       .AddItem "1979"
  1196.       .AddItem "1978"
  1197.       .AddItem "1977"
  1198.       .AddItem "1976"
  1199.       .AddItem "1975"
  1200.       .AddItem "1974"
  1201.       .AddItem "1973"
  1202.       .AddItem "1972"
  1203.       .AddItem "1971"
  1204.       .AddItem "1970"
  1205.       .AddItem "1969"
  1206.       .AddItem "1968"
  1207.       .AddItem "1967"
  1208.       .AddItem "1966"
  1209.       .AddItem "1965"
  1210.       .AddItem "1964"
  1211.       .AddItem "1963"
  1212.       .AddItem "1962"
  1213.       .AddItem "1961"
  1214.       .AddItem "1960"
  1215.       .AddItem "1959"
  1216.       .AddItem "1958"
  1217.       .AddItem "1957"
  1218.       .AddItem "1956"
  1219.       .AddItem "1955"
  1220.       .AddItem "1954"
  1221.       .AddItem "1953"
  1222.       .AddItem "1952"
  1223.       .AddItem "1951"
  1224.       .AddItem "1950"
  1225.    End With
  1226.  
  1227. With cbod1
  1228.       .AddItem "01"
  1229.       .AddItem "02"
  1230.       .AddItem "03"
  1231.       .AddItem "04"
  1232.       .AddItem "05"
  1233.       .AddItem "06"
  1234.       .AddItem "07"
  1235.       .AddItem "08"
  1236.       .AddItem "09"
  1237.       .AddItem "10"
  1238.       .AddItem "11"
  1239.       .AddItem "12"
  1240.       .AddItem "13"
  1241.       .AddItem "14"
  1242.       .AddItem "15"
  1243.       .AddItem "15"
  1244.       .AddItem "16"
  1245.       .AddItem "17"
  1246.       .AddItem "18"
  1247.       .AddItem "19"
  1248.       .AddItem "20"
  1249.       .AddItem "21"
  1250.       .AddItem "22"
  1251.       .AddItem "23"
  1252.       .AddItem "24"
  1253.       .AddItem "25"
  1254.       .AddItem "26"
  1255.       .AddItem "27"
  1256.       .AddItem "28"
  1257.       .AddItem "29"
  1258.       .AddItem "30"
  1259.       .AddItem "31"
  1260.    End With
  1261.  
  1262.    With cbom1
  1263.       .AddItem "01"
  1264.       .AddItem "02"
  1265.       .AddItem "03"
  1266.       .AddItem "04"
  1267.       .AddItem "05"
  1268.       .AddItem "06"
  1269.       .AddItem "07"
  1270.       .AddItem "08"
  1271.       .AddItem "09"
  1272.       .AddItem "10"
  1273.       .AddItem "11"
  1274.       .AddItem "12"
  1275.    End With
  1276.  
  1277.    With cboy1
  1278.       .AddItem "2011"
  1279.       .AddItem "2010"
  1280.       .AddItem "2009"
  1281.       .AddItem "2008"
  1282.       .AddItem "2007"
  1283.       .AddItem "2006"
  1284.       .AddItem "2005"
  1285.       .AddItem "2004"
  1286.       .AddItem "2003"
  1287.       .AddItem "2002"
  1288.       .AddItem "2001"
  1289.       .AddItem "2000"
  1290.       .AddItem "1999"
  1291.       .AddItem "1997"
  1292.       .AddItem "1996"
  1293.       .AddItem "1995"
  1294.       .AddItem "1994"
  1295.       .AddItem "1993"
  1296.       .AddItem "1992"
  1297.       .AddItem "1991"
  1298.       .AddItem "1990"
  1299.       .AddItem "1989"
  1300.       .AddItem "1988"
  1301.       .AddItem "1987"
  1302.       .AddItem "1986"
  1303.       .AddItem "1985"
  1304.       .AddItem "1984"
  1305.       .AddItem "1983"
  1306.       .AddItem "1982"
  1307.       .AddItem "1981"
  1308.       .AddItem "1980"
  1309.       .AddItem "1979"
  1310.       .AddItem "1978"
  1311.       .AddItem "1977"
  1312.       .AddItem "1976"
  1313.       .AddItem "1975"
  1314.       .AddItem "1974"
  1315.       .AddItem "1973"
  1316.       .AddItem "1972"
  1317.       .AddItem "1971"
  1318.       .AddItem "1970"
  1319.       .AddItem "1969"
  1320.       .AddItem "1968"
  1321.       .AddItem "1967"
  1322.       .AddItem "1966"
  1323.       .AddItem "1965"
  1324.       .AddItem "1964"
  1325.       .AddItem "1963"
  1326.       .AddItem "1962"
  1327.       .AddItem "1961"
  1328.       .AddItem "1960"
  1329.       .AddItem "1959"
  1330.       .AddItem "1958"
  1331.       .AddItem "1957"
  1332.       .AddItem "1956"
  1333.       .AddItem "1955"
  1334.       .AddItem "1954"
  1335.       .AddItem "1953"
  1336.       .AddItem "1952"
  1337.       .AddItem "1951"
  1338.       .AddItem "1950"
  1339.    End With
  1340.  
  1341.    With cbod2
  1342.       .AddItem "01"
  1343.       .AddItem "02"
  1344.       .AddItem "03"
  1345.       .AddItem "04"
  1346.       .AddItem "05"
  1347.       .AddItem "06"
  1348.       .AddItem "07"
  1349.       .AddItem "08"
  1350.       .AddItem "09"
  1351.       .AddItem "10"
  1352.       .AddItem "11"
  1353.       .AddItem "12"
  1354.       .AddItem "13"
  1355.       .AddItem "14"
  1356.       .AddItem "15"
  1357.       .AddItem "15"
  1358.       .AddItem "16"
  1359.       .AddItem "17"
  1360.       .AddItem "18"
  1361.       .AddItem "19"
  1362.       .AddItem "20"
  1363.       .AddItem "21"
  1364.       .AddItem "22"
  1365.       .AddItem "23"
  1366.       .AddItem "24"
  1367.       .AddItem "25"
  1368.       .AddItem "26"
  1369.       .AddItem "27"
  1370.       .AddItem "28"
  1371.       .AddItem "29"
  1372.       .AddItem "30"
  1373.       .AddItem "31"
  1374.    End With
  1375.  
  1376.    With cbom2
  1377.       .AddItem "01"
  1378.       .AddItem "02"
  1379.       .AddItem "03"
  1380.       .AddItem "04"
  1381.       .AddItem "05"
  1382.       .AddItem "06"
  1383.       .AddItem "07"
  1384.       .AddItem "08"
  1385.       .AddItem "09"
  1386.       .AddItem "10"
  1387.       .AddItem "11"
  1388.       .AddItem "12"
  1389.    End With
  1390.  
  1391.    With cboy2
  1392.       .AddItem "2011"
  1393.       .AddItem "2010"
  1394.       .AddItem "2009"
  1395.       .AddItem "2008"
  1396.       .AddItem "2007"
  1397.       .AddItem "2006"
  1398.       .AddItem "2005"
  1399.       .AddItem "2004"
  1400.       .AddItem "2003"
  1401.       .AddItem "2002"
  1402.       .AddItem "2001"
  1403.       .AddItem "2000"
  1404.       .AddItem "1999"
  1405.       .AddItem "1997"
  1406.       .AddItem "1996"
  1407.       .AddItem "1995"
  1408.       .AddItem "1994"
  1409.       .AddItem "1993"
  1410.       .AddItem "1992"
  1411.       .AddItem "1991"
  1412.       .AddItem "1990"
  1413.       .AddItem "1989"
  1414.       .AddItem "1988"
  1415.       .AddItem "1987"
  1416.       .AddItem "1986"
  1417.       .AddItem "1985"
  1418.       .AddItem "1984"
  1419.       .AddItem "1983"
  1420.       .AddItem "1982"
  1421.       .AddItem "1981"
  1422.       .AddItem "1980"
  1423.       .AddItem "1979"
  1424.       .AddItem "1978"
  1425.       .AddItem "1977"
  1426.       .AddItem "1976"
  1427.       .AddItem "1975"
  1428.       .AddItem "1974"
  1429.       .AddItem "1973"
  1430.       .AddItem "1972"
  1431.       .AddItem "1971"
  1432.       .AddItem "1970"
  1433.       .AddItem "1969"
  1434.       .AddItem "1968"
  1435.       .AddItem "1967"
  1436.       .AddItem "1966"
  1437.       .AddItem "1965"
  1438.       .AddItem "1964"
  1439.       .AddItem "1963"
  1440.       .AddItem "1962"
  1441.       .AddItem "1961"
  1442.       .AddItem "1960"
  1443.       .AddItem "1959"
  1444.       .AddItem "1958"
  1445.       .AddItem "1957"
  1446.       .AddItem "1956"
  1447.       .AddItem "1955"
  1448.       .AddItem "1954"
  1449.       .AddItem "1953"
  1450.       .AddItem "1952"
  1451.       .AddItem "1951"
  1452.       .AddItem "1950"
  1453.    End With
  1454.  
  1455.     With cbod4
  1456.       .AddItem "01"
  1457.       .AddItem "02"
  1458.       .AddItem "03"
  1459.       .AddItem "04"
  1460.       .AddItem "05"
  1461.       .AddItem "06"
  1462.       .AddItem "07"
  1463.       .AddItem "08"
  1464.       .AddItem "09"
  1465.       .AddItem "10"
  1466.       .AddItem "11"
  1467.       .AddItem "12"
  1468.       .AddItem "13"
  1469.       .AddItem "14"
  1470.       .AddItem "15"
  1471.       .AddItem "15"
  1472.       .AddItem "16"
  1473.       .AddItem "17"
  1474.       .AddItem "18"
  1475.       .AddItem "19"
  1476.       .AddItem "20"
  1477.       .AddItem "21"
  1478.       .AddItem "22"
  1479.       .AddItem "23"
  1480.       .AddItem "24"
  1481.       .AddItem "25"
  1482.       .AddItem "26"
  1483.       .AddItem "27"
  1484.       .AddItem "28"
  1485.       .AddItem "29"
  1486.       .AddItem "30"
  1487.       .AddItem "31"
  1488.    End With
  1489.  
  1490.    With cbom4
  1491.       .AddItem "01"
  1492.       .AddItem "02"
  1493.       .AddItem "03"
  1494.       .AddItem "04"
  1495.       .AddItem "05"
  1496.       .AddItem "06"
  1497.       .AddItem "07"
  1498.       .AddItem "08"
  1499.       .AddItem "09"
  1500.       .AddItem "10"
  1501.       .AddItem "11"
  1502.       .AddItem "12"
  1503.    End With
  1504.  
  1505.    With cboy4
  1506.       .AddItem "2011"
  1507.       .AddItem "2010"
  1508.       .AddItem "2009"
  1509.       .AddItem "2008"
  1510.       .AddItem "2007"
  1511.       .AddItem "2006"
  1512.       .AddItem "2005"
  1513.       .AddItem "2004"
  1514.       .AddItem "2003"
  1515.       .AddItem "2002"
  1516.       .AddItem "2001"
  1517.       .AddItem "2000"
  1518.       .AddItem "1999"
  1519.       .AddItem "1997"
  1520.       .AddItem "1996"
  1521.       .AddItem "1995"
  1522.       .AddItem "1994"
  1523.       .AddItem "1993"
  1524.       .AddItem "1992"
  1525.       .AddItem "1991"
  1526.       .AddItem "1990"
  1527.       .AddItem "1989"
  1528.       .AddItem "1988"
  1529.       .AddItem "1987"
  1530.       .AddItem "1986"
  1531.       .AddItem "1985"
  1532.       .AddItem "1984"
  1533.       .AddItem "1983"
  1534.       .AddItem "1982"
  1535.       .AddItem "1981"
  1536.       .AddItem "1980"
  1537.       .AddItem "1979"
  1538.       .AddItem "1978"
  1539.       .AddItem "1977"
  1540.       .AddItem "1976"
  1541.       .AddItem "1975"
  1542.       .AddItem "1974"
  1543.       .AddItem "1973"
  1544.       .AddItem "1972"
  1545.       .AddItem "1971"
  1546.       .AddItem "1970"
  1547.       .AddItem "1969"
  1548.       .AddItem "1968"
  1549.       .AddItem "1967"
  1550.       .AddItem "1966"
  1551.       .AddItem "1965"
  1552.       .AddItem "1964"
  1553.       .AddItem "1963"
  1554.       .AddItem "1962"
  1555.       .AddItem "1961"
  1556.       .AddItem "1960"
  1557.       .AddItem "1959"
  1558.       .AddItem "1958"
  1559.       .AddItem "1957"
  1560.       .AddItem "1956"
  1561.       .AddItem "1955"
  1562.       .AddItem "1954"
  1563.       .AddItem "1953"
  1564.       .AddItem "1952"
  1565.       .AddItem "1951"
  1566.       .AddItem "1950"
  1567.    End With
  1568. End Sub
Aug 19 '09 #3
Frinavale
9,735 Recognized Expert Moderator Expert
Felipebucaram,

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

Thanks,

-Frinny
Sep 3 '09 #4
debasisdas
8,127 Recognized Expert Expert
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.
Sep 3 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7495
by: Wayne Wengert | last post by:
I am trying to populate a combobox with a lisy of items. I want the 1st item to be "Make a Selection" and the following items will be names from a table in my DB (See code below). When I run the project, the combox box initially displays an empty selection. When I click on the drop down arrow I see the "Make a Selection" followed by the other choices. How can I move everything up so that the "Make a Selection" is the default value in...
0
630
by: stingrays | last post by:
Below is my code for a combobox. Basically, I have 2 comboboxes. 1 box is the application selection and the other retrieves data from the dataset (SQL Server) to populate the drop down in the otehr box. I want to make a selection in the app combobox, update the second box and when I select a new app, it should remove all items in teh 2nd combobox and refresh the list with only the selected app. With this code it appears the binding is...
0
2380
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first changed letter) because he reset the selectedindex of the combobox to -1. In debug mode I can't see where he does this. How can I solve this? My code sofar: contactlijst is a structure and the volgnummer is the index of the item in the combobox
5
1776
by: Wally | last post by:
I need to browse all ITEMS of a ListBox and all ITEMS of a ComboBox. I wrote 2 distinct Sub that are almost identical. The difference is only the object type. How could I browsing ITEMS using only one Sub with object as parameter? Here, my two Subs. Thanks Private Sub AnalyzeListBox()
9
7322
by: Don | last post by:
Is there any way to detect when an item has been added to the Items collection of a combobox or listbox? I am inheriting a Combobox and want to validate items before they are added to the combobox, but I can't find anything that will let me do that. - Don
0
2180
by: HKSHK | last post by:
Hi guys, I'm currently trying to implement the VB6-ItemsData property into a CombolBox and it works so far, but there is one problem... I can only inherit one class to another class, which is either a) System.Windows.Forms.ComboBox or b) System.Windows.Forms.ComboBox.ObjectCollection. If I add (a) I can't override Items.Add.
1
4719
by: Gian Paolo | last post by:
hi all i'm looking for a way to add 2 items in a combobox in the same line and hide one. i'm working on the code above but it returns me only the last value i entered and i do not know why.... *********** CLASS using System; using System.Collections.Generic;
3
18016
by: samoore33 | last post by:
I am populating a ComboBox at run time. I insert the first value of "Choose Value" cboTaxValue.Item.Insert(0, "Choose Value") Then I loop through the rest of the values to be added to the combobox. My problem is that when I try to clear the ComboBox it clears the items that were inserted into the ComboBox, but does not clear the item I selected in the ComboBox... For Instance.
1
14707
by: JAnn81 | last post by:
I have a combo box created using xaml. I bind the item source to a xml document. <Items> <Item> <Name>David</Name> <Age>20</Age> </Item> <Item> <Name>Marcus</Name> <Age>25</Age>
5
18757
by: Kevinp | last post by:
I've spent the last four hours Google searching for a way to disable items in a Combobox. I found one example in C++ which I can't get to work and another in C# that I couldn't get to work either. Does anyone have some good code for an owner-drawn combobox?
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.