Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

exportar contenido web a excel y clasificar en columnas

publicado

Estoy trabajando en una macro de forma que me permita extraer de una pagina de ofertas de empleo americana la información de ofertas según el código postal y la zona.

Creo que la macro está bien pero cuando intento ejecutarla, nada más empezar, en el módulo 2 me subraya en azul la linea Macro 1 y aparece un aviso diciendo "error de compilación, No se ha definido Sub o Funcioo" He revisado la hoja de excel y no sé donde puedo equivocarme.

La macro del módulo 1 es la que tendría que activarse si funcionase bien la macro

Aquí tenéis el codigo de programacion del módulo 2. Pongo en rojo la línea donde excel se detiene y aparece el mensaje antes indicado

----------------------------------------

Sub test()

Dim eROW As Long

Dim ELE As Object

Set STH = Sheets("SHEET1")

RowCount = 1

STH.Range("A" & RowCount) = "TITLE"

STH.Range("B" & RowCount) = "COMPANY"

STH.Range("C" & RowCount) = "LOCATION"

STH.Range("D" & RowCount) = "DESCRIPTION"

eROW = SHEET1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row

Set OBJIE = CreateObject("INTERNETEXPLORER.APPLICATION")

myjobtype = InputBox("ENTER TYPE OF JOB EG. SALES, ADMINISTRATION")

myzip = InputBox("ENTER ZIPCODE OF AREA WHERE YOU WISH TO WORK")

With OBJIE

.Visible = True

.navigate "http://www.jobs.com/"

Do While .busy Or _

.READYSTATE <> 4

DoEvents

Loop

Set what = .document.getELementsbyName("q")

what.Item(0).Value = myjobtype

Set zipcode = .document.getELementsbyName("where")

zipcode.Item(0).Value = myzip

.document.getelementbyid("jobsbutton").Click

Do While .busy Or _

.READYSTATE <> 4

DoEvents

Loop

For Each ELE In .document.all

Select Case ELE.classname

Case "result"

RowCount = RowCount + 1

Case "title"

sht.Range("A" & RowCount) = ELE.INNERTEXT

Case "COMPANY"

sht.Range("B" & RowCount) = ELE.INNERTEXT

Case "LOCATION"

sht.Range("C" & RowCount) = ELE.INNERTEXT

Case "DESCRIPTION"

sht.Range("D" & RowCount) = ELE.INNERTEXT

End Select

Next ELE

End With

Macro1

Set OBJIE = Nothing

End Sub

------------------------------------------

Adjunto el archivo en formato zip

Gracias x adelantado.

Borja

exportador.zip

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.