
CALCULO DE RFC POR VBA DESDE EXCEL A WEB
Publicado por ingrid (3 intervenciones) el 15/12/2022 23:11:10
Hola, por mi trabajo realizo el calculo de la homoclave del RFC, en una pagina de consulta publica https://consisa.com.mx/rfc atravez de un listado de nombres y rfc que ya tengo en excel, he intentado usar una macro que realiza el ingreso automatico de los datos pero no me carga la pagina, lo intentado con otras y si lo logro hacer, no se que pueda esta haciendo mal, o si es la seguridad de la misma pagina que no lo permita, podrian ayudarme, se los agradezco mucho.
les dejo el codigo
les dejo el codigo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Sub CONSISA()
Dim ie As Object
'Set ie = New InternetExplorerMedium
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate "https://consisa.com.mx/rfc"
ie.Visible = True
Do Until ie.READYSTATE = 4
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:01"))
With ie
.document.getElementById("strNombre").Value = Range("A2").Value
.document.getElementById("strPrimerApellido").Value = Range("B2").Value
.document.getElementById("strSegundoApellido").Value = Range("C2").Value
.document.getElementById("strdia").Value = Range("G2").Value
.document.getElementById("strmes").Value = Range("F2").Value
.document.getElementById("stranio").Value = Range("E2").Value
.document.getElementById("rfc_submitted").Click
.Visible = True
End With
Set ie = Nothing
End Sub
Valora esta pregunta


0