Posted By

Angelboy on 09/09/10


Tagged

vb6


Versions (?)

Seperar valores de VL64


 / Published in: Visual Basic
 

  1. Private Sub Command1_Click()
  2. Dim i As Long
  3. Dim j As Long
  4. Dim d As String
  5. j = j - 1
  6. datos = Text2.Text
  7. For i = 1 To Len(datos)
  8. j = j + 1
  9. ' un digito neutral
  10.  
  11. If InStr(Mid(datos, i, 1), "H") Then
  12. d = Mid(datos, i, 1)
  13. Text1.Text = Text1.Text & d & vbNewLine
  14.  
  15. End If
  16.  
  17. 'un dijito positivo
  18. If InStr(Mid(datos, i, 1), "I") Then
  19. d = Mid(datos, i, 1)
  20. Text1.Text = Text1.Text & d & vbNewLine
  21. End If
  22.  
  23. If InStr(Mid(datos, i, 1), "J") Then
  24. d = Mid(datos, i, 1)
  25. Text1.Text = Text1.Text & d & vbNewLine
  26. End If
  27.  
  28. If InStr(Mid(datos, i, 1), "K") Then
  29. d = Mid(datos, i, 1)
  30. Text1.Text = Text1.Text & d & vbNewLine
  31. End If
  32.  
  33.  
  34.  
  35. 'un dijito negativo
  36. If InStr(Mid(datos, i, 1), "M") Then
  37. d = Mid(datos, i, 1)
  38. Text1.Text = Text1.Text & d & vbNewLine
  39. End If
  40.  
  41. If InStr(Mid(datos, i, 1), "N") Then
  42. d = Mid(datos, i, 1)
  43. Text1.Text = Text1.Text & d & vbNewLine
  44. End If
  45.  
  46. If InStr(Mid(datos, i, 1), "O") Then
  47. d = Mid(datos, i, 1)
  48. Text1.Text = Text1.Text & d & vbNewLine
  49. End If
  50.  
  51.  
  52.  
  53. 'dos dijito positivo
  54. If InStr(Mid(datos, i, 1), "P") Then
  55. d = Mid(datos, i, 2)
  56. Text1.Text = Text1.Text & d & vbNewLine
  57. i = i + 1
  58. End If
  59.  
  60. If InStr(Mid(datos, i, 1), "Q") Then
  61. d = Mid(datos, i, 2)
  62. Text1.Text = Text1.Text & d & vbNewLine
  63. i = i + 1
  64. End If
  65.  
  66. If InStr(Mid(datos, i, 1), "R") Then
  67. d = Mid(datos, i, 2)
  68. Text1.Text = Text1.Text & d & vbNewLine
  69. i = i + 1
  70. End If
  71.  
  72. If InStr(Mid(datos, i, 1), "S") Then
  73. d = Mid(datos, i, 2)
  74. Text1.Text = Text1.Text & d & vbNewLine
  75. i = i + 1
  76. End If
  77.  
  78.  
  79. 'dos dijito negativo
  80. If InStr(Mid(datos, i, 1), "T") Then
  81. d = Mid(datos, i, 2)
  82. Text1.Text = Text1.Text & d & vbNewLine
  83. i = i + 1
  84. End If
  85.  
  86. If InStr(Mid(datos, i, 1), "U") Then
  87. d = Mid(datos, i, 2)
  88. Text1.Text = Text1.Text & d & vbNewLine
  89. i = i + 1
  90. End If
  91.  
  92. If InStr(Mid(datos, i, 1), "V") Then
  93. d = Mid(datos, i, 2)
  94. Text1.Text = Text1.Text & d & vbNewLine
  95. i = i + 1
  96. End If
  97.  
  98. If InStr(Mid(datos, i, 1), "W") Then
  99. d = Mid(datos, i, 2)
  100. Text1.Text = Text1.Text & d & vbNewLine
  101. i = i + 1
  102. End If
  103.  
  104.  
  105. 'tres digitos positivo
  106. If InStr(Mid(datos, i, 1), "X") Then
  107. d = Mid(datos, i, 3)
  108. Text1.Text = Text1.Text & d & vbNewLine
  109. i = i + 2
  110. End If
  111.  
  112. If InStr(Mid(datos, i, 1), "Y") Then
  113. d = Mid(datos, i, 3)
  114. Text1.Text = Text1.Text & d & vbNewLine
  115. i = i + 2
  116. End If
  117.  
  118. If InStr(Mid(datos, i, 1), "Z") Then
  119. d = Mid(datos, i, 3)
  120. Text1.Text = Text1.Text & d & vbNewLine
  121. i = i + 2
  122. End If
  123.  
  124. If InStr(Mid(datos, i, 1), "[") Then
  125. d = Mid(datos, i, 3)
  126. Text1.Text = Text1.Text & d & vbNewLine
  127. i = i + 2
  128. End If
  129.  
  130.  
  131. 'tres digitos negativo
  132. If InStr(Mid(datos, i, 1), "\") Then
  133. d = Mid(datos, i, 3)
  134. Text1.Text = Text1.Text & d & vbNewLine
  135. i = i + 2
  136. End If
  137.  
  138. If InStr(Mid(datos, i, 1), "]") Then
  139. d = Mid(datos, i, 3)
  140. Text1.Text = Text1.Text & d & vbNewLine
  141. i = i + 2
  142. End If
  143.  
  144. If InStr(Mid(datos, i, 1), "^") Then
  145. d = Mid(datos, i, 3)
  146. Text1.Text = Text1.Text & d & vbNewLine
  147. i = i + 2
  148. End If
  149.  
  150. If InStr(Mid(datos, i, 1), "_") Then
  151. d = Mid(datos, i, 3)
  152. Text1.Text = Text1.Text & d & vbNewLine
  153. i = i + 2
  154. End If
  155.  
  156.  
  157. 'cuatro digitos positivo
  158. If InStr(Mid(datos, i, 1), "`") Then
  159. d = Mid(datos, i, 4)
  160. Text1.Text = Text1.Text & d & vbNewLine
  161. i = i + 3
  162. End If
  163.  
  164. If InStr(Mid(datos, i, 1), "a") Then
  165. d = Mid(datos, i, 4)
  166. Text1.Text = Text1.Text & d & vbNewLine
  167. i = i + 3
  168. End If
  169.  
  170. If InStr(Mid(datos, i, 1), "b") Then
  171. d = Mid(datos, i, 4)
  172. Text1.Text = Text1.Text & d & vbNewLine
  173. i = i + 3
  174. End If
  175.  
  176. If InStr(Mid(datos, i, 1), "c") Then
  177. d = Mid(datos, i, 4)
  178. Text1.Text = Text1.Text & d & vbNewLine
  179. i = i + 3
  180. End If
  181.  
  182. 'cuatro digitos negativos
  183. If InStr(Mid(datos, i, 1), "d") Then
  184. d = Mid(datos, i, 4)
  185. Text1.Text = Text1.Text & d & vbNewLine
  186. i = i + 3
  187. End If
  188.  
  189. If InStr(Mid(datos, i, 1), "e") Then
  190. d = Mid(datos, i, 4)
  191. Text1.Text = Text1.Text & d & vbNewLine
  192. i = i + 3
  193. End If
  194.  
  195. If InStr(Mid(datos, i, 1), "f") Then
  196. d = Mid(datos, i, 4)
  197. Text1.Text = Text1.Text & d & vbNewLine
  198. i = i + 3
  199. End If
  200.  
  201. If InStr(Mid(datos, i, 1), "g") Then
  202. d = Mid(datos, i, 4)
  203. Text1.Text = Text1.Text & d & vbNewLine
  204. i = i + 3
  205. End If
  206.  
  207.  
  208. 'cinco digitos positivo
  209. If InStr(Mid(datos, i, 1), "h") Then
  210. d = Mid(datos, i, 5)
  211. Text1.Text = Text1.Text & d & vbNewLine
  212. i = i + 4
  213. End If
  214.  
  215. If InStr(Mid(datos, i, 1), "i") Then
  216. d = Mid(datos, i, 5)
  217. Text1.Text = Text1.Text & d & vbNewLine
  218. i = i + 4
  219. End If
  220.  
  221. If InStr(Mid(datos, i, 1), "j") Then
  222. d = Mid(datos, i, 5)
  223. Text1.Text = Text1.Text & d & vbNewLine
  224. i = i + 4
  225. End If
  226.  
  227. If InStr(Mid(datos, i, 1), "k") Then
  228. d = Mid(datos, i, 5)
  229. Text1.Text = Text1.Text & d & vbNewLine
  230. i = i + 4
  231. End If
  232.  
  233.  
  234. 'cinco digitos negativo
  235. If InStr(Mid(datos, i, 1), "l") Then
  236. d = Mid(datos, i, 5)
  237. Text1.Text = Text1.Text & d & vbNewLine
  238. i = i + 4
  239. End If
  240.  
  241. If InStr(Mid(datos, i, 1), "m") Then
  242. d = Mid(datos, i, 5)
  243. Text1.Text = Text1.Text & d & vbNewLine
  244. i = i + 4
  245. End If
  246.  
  247. If InStr(Mid(datos, i, 1), "n") Then
  248. d = Mid(datos, i, 5)
  249. Text1.Text = Text1.Text & d & vbNewLine
  250. i = i + 4
  251. End If
  252.  
  253. If InStr(Mid(datos, i, 1), "o") Then
  254. d = Mid(datos, i, 5)
  255. Text1.Text = Text1.Text & d & vbNewLine
  256. i = i + 4
  257. End If
  258.  
  259.  
  260. 'seis digitos positivo
  261. If InStr(Mid(datos, i, 1), "p") Then
  262. d = Mid(datos, i, 6)
  263. Text1.Text = Text1.Text & d & vbNewLine
  264. i = i + 5
  265. End If
  266.  
  267. If InStr(Mid(datos, i, 1), "q") Then
  268. d = Mid(datos, i, 6)
  269. Text1.Text = Text1.Text & d & vbNewLine
  270. i = i + 5
  271. End If
  272.  
  273. If InStr(Mid(datos, i, 1), "r") Then
  274. d = Mid(datos, i, 6)
  275. Text1.Text = Text1.Text & d & vbNewLine
  276. i = i + 5
  277. End If
  278.  
  279. If InStr(Mid(datos, i, 1), "s") Then
  280. d = Mid(datos, i, 6)
  281. Text1.Text = Text1.Text & d & vbNewLine
  282. i = i + 5
  283. End If
  284.  
  285. 'seis digitos negativo
  286. If InStr(Mid(datos, i, 1), "t") Then
  287. d = Mid(datos, i, 6)
  288. Text1.Text = Text1.Text & d & vbNewLine
  289. i = i + 5
  290. End If
  291.  
  292. If InStr(Mid(datos, i, 1), "u") Then
  293. d = Mid(datos, i, 6)
  294. Text1.Text = Text1.Text & d & vbNewLine
  295. i = i + 5
  296. End If
  297.  
  298. If InStr(Mid(datos, i, 1), "v") Then
  299. d = Mid(datos, i, 6)
  300. Text1.Text = Text1.Text & d & vbNewLine
  301. i = i + 5
  302. End If
  303.  
  304. If InStr(Mid(datos, i, 1), "w") Then
  305. d = Mid(datos, i, 6)
  306. Text1.Text = Text1.Text & d & vbNewLine
  307. i = i + 5
  308. End If
  309.  
  310.  
  311.  
  312. Next
  313. MsgBox j
  314. End Sub

Report this snippet  

You need to login to post a comment.