Saludos Profesor Sergio, de ante mano gracias por responder, realice lo que me sugirió coloque el código donde me indicó, sin embargo me sigue arrojando el mismo error.
' Restaurar formato de fuente
With wsHistorico.Rows("2:2").Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
' Incrementar automáticamente el número de recibo
wsRecibo.Range("J2").Value = wsRecibo.Range("J2").Value + 1
'Corrección de Error en impresión
Application.Wait (Now + TimeValue("0:00:01"))
' Imprimir
wsRecibo.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Por
dorgelis, · publicado
Buenas noches,
Estoy intentando utilizar esta macro pero no me responde y desconozco porqué.
Además el navegador que uso suele ser chrome. ¿Alguien puede ayudarme a saber porque no se ejecuta bien?
Gracias
adjunto código
---
Sub scrapeHyperlinksWebsite()
Dim ie As InternetExplorer
Dim html As HTMLDocument
Dim Link As Object
Dim ElementCol As Object
Dim erow As Long
Application.ScreenUpdating = False
Set ie = New InternetExplorer
ie.Visible = False
‘ie.navigate “http://www.rondebruin.nl/contact.htm”
‘ie.navigate “http://info.mathxlforschool.com/contact-us”
ie.navigate “http://www.iberia.es”
Do While ie.readyState <> READYSTATE_COMPLETE
Application.StatusBar = “Loading website…”
DoEvents
Loop
Set html = ie.document
‘Range(“A2″) = html.DocumentElement.innerHTML
Set ElementCol = html.getElementsByTagName(“a”)
‘Set ElementCol = html.getElementsByTagName(“mailto:”)
For Each Link In ElementCol
If InStr(Link, “mailto:”) Then
erow = Worksheets(“Sheet1″).Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 1).Value = Link
Cells(erow, 1) = Right(Link, Len(Link) – InStr(Link, “:”))Cells(erow, 1).Columns.AutoFit
End If
Next
Set ie = Nothing
Application.StatusBar = “”
Application.ScreenUpdating = True
End Sub