Important alert: (current site time 11/1/2014 5:04:55 AM EDT)
 

VB icon

Calcula Digito Verificador del CUIT (Solo ARGENTINA)

Email
Submitted on: 8/10/2004 2:17:04 PM
By: DiegoDAF  
Level: Beginner
User Rating: Unrated
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0, VB Script, ASP (Active Server Pages) , VBA MS Access, VBA MS Excel
Views: 4519
author picture
 
     Esta Funcion Verifica que el numero de CUIT ingresado sea Valido. Solo sirve para la Rep. Argentina
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: Calcula Digito Verificador del CUIT (Solo ARGENTINA)
' Description:Esta Funcion Verifica que el numero de CUIT ingresado sea Valido. Solo sirve para la Rep. Argentina
' By: DiegoDAF
'
' Inputs:NumeroDeCUIT es un string que contiene el numero de cuit sin los guiones
Ej: NumeroDeCUIT = "20275000869"
'
' Returns:Verdadero o Falso
'
' Assumes:Private Sub main()
c = "20275000869"
Debug.Print CUIT(c)
End Sub
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=55494&lngWId=1'for details.'**************************************

Function CUIT(NumeroDeCUIT)
a = 0
For x = 1 To 11
n = Mid(NumeroDeCUIT, x, 1)
n = n + 48
Select Case x
Case 1: m = 5
Case 2: m = 4
Case 3: m = 3
Case 4: m = 2
Case 5: m = 7
Case 6: m = 6
Case 7: m = 5
Case 8: m = 4
Case 9: m = 3
Case 10: m = 2
Case 11: m = 1
End Select
a = a + n * m
Next
a = a Mod 11
If a = 3 Then
CUIT = True
Else
CUIT = False
End If
End Function


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

8/10/2004 3:49:31 PMBrian_A

Por que no sirve todo el mundo?
(If this comment was disrespectful, please report it.)

 
8/10/2004 3:52:53 PMBrian_A

Y, si me no comprendes perfectamente, es porque no soy de argentina y hablo mexicano
(If this comment was disrespectful, please report it.)

 
8/10/2004 4:06:31 PMDiegoDAF

Es que no se si el CUIT se maneja en algun otro pais que no sea Argentina y aun siendo asi no se si se calcula de la mimsa forma ya que toda la info para este calculo la saque de la pagina de la afip.gov.ar

Igualmente probar no esta de mas.

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.