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.

Llenado formulario web desde vba excel

publicado

Buenas,

reciban un cordial saludo,

despues de tanto buscar y probar no he podido lograr llenar un formulario WEB con una dato y luego hacer la busqueda.

a ver quien me una ayuda con este codigo.

Primero hago la conexion del usuario y me logeo con existo con este codigo.

Sub PS_ACCESO_001()
Dim IE As Object, tags As Object, tagx As Object

If Hoja2.Cbo_Usuario.Value = "" Or Hoja2.Txt_Psw.Value = "" Then Exit Sub
Application.StatusBar = "Verificando usuario. Please wait..."
Set IE = CreateObject("InternetExplorer.Application")
With IE
IE.Navigate "http://pspa91web=login&languageCd=ESP"
While .Busy
DoEvents
Wend
.Document.all.Item("userid").Value = Hoja2.Cbo_Usuario.Value
.Document.all.Item("pwd").Value = Hoja2.Txt_Psw.Value
.Document.all.Item("Submit").Click
.Visible = False
' .Quit
End With
Application.StatusBar = "Conexion Exitosa. Please wait..."
Set IE = Nothing
Call PS_ACCESO_002
End Sub[/CODE]

Luego de estar logueado lo que intento es navegar y tratar de enviar un valor y hacer un sumit o click sobre buscar... pero no he podido lograrlo ni insertar el valor "DESC" ni hacer la busqueda.

[CODE]Sub PS_ACCESO_002()
Dim IE As Object
If Hoja2.Cbo_Usuario.Value = "" Or Hoja2.Txt_Psw.Value = "" Then Exit Sub
Application.StatusBar = "Consultando pagina. Please wait..."
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate "http://%"
While .Busy
DoEvents
Wend
' .Document.all.Item("AJ_UPDITMDE_RCT_RUN_CNTL_ID").Value = "DESC" ' Esto me da error XXXX
' .Document.all.Item("#ICSearch").Click ' Esto me da error XXXX

Do While .Busy
DoEvents
Loop
' IE.Document.forms("win0").getelementbyid("#ICSearch").Click ' Esto me da error XXXX
.Visible = True

Set IE = Nothing

End With
End Sub
[/CODE]

Anexo el codigo que me da el el explorador el la pagina donde deseo rellenar el texto " DESC" y dar buscar.

DEFINE_ITEMS.AJ_UPD_ITM_DESC.TXT

Featured Replies

publicado
  • Autor
Buenas,

reciban un cordial saludo,

despues de tanto buscar y probar no he podido lograr llenar un formulario WEB con una dato y luego hacer la busqueda.

a ver quien me una ayuda con este codigo.

Primero hago la conexion del usuario y me logeo con existo con este codigo.

Sub PS_ACCESO_001()
Dim IE As Object, tags As Object, tagx As Object

If Hoja2.Cbo_Usuario.Value = "" Or Hoja2.Txt_Psw.Value = "" Then Exit Sub
Application.StatusBar = "Verificando usuario. Please wait..."
Set IE = CreateObject("InternetExplorer.Application")
With IE
IE.Navigate "http://pspa91web=login&languageCd=ESP"
While .Busy
DoEvents
Wend
.Document.all.Item("userid").Value = Hoja2.Cbo_Usuario.Value
.Document.all.Item("pwd").Value = Hoja2.Txt_Psw.Value
.Document.all.Item("Submit").Click
.Visible = False
' .Quit
End With
Application.StatusBar = "Conexion Exitosa. Please wait..."
Set IE = Nothing
Call PS_ACCESO_002
End Sub[/CODE]

Luego de estar logueado lo que intento es navegar y tratar de enviar un valor y hacer un sumit o click sobre buscar... pero no he podido lograrlo ni insertar el valor "DESC" ni hacer la busqueda.

[CODE]Sub PS_ACCESO_002()
Dim IE As Object
If Hoja2.Cbo_Usuario.Value = "" Or Hoja2.Txt_Psw.Value = "" Then Exit Sub
Application.StatusBar = "Consultando pagina. Please wait..."
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate "http://%"
While .Busy
DoEvents
Wend
' .Document.all.Item("AJ_UPDITMDE_RCT_RUN_CNTL_ID").Value = "DESC" ' Esto me da error XXXX
' .Document.all.Item("#ICSearch").Click ' Esto me da error XXXX

Do While .Busy
DoEvents
Loop
' IE.Document.forms("win0").getelementbyid("#ICSearch").Click ' Esto me da error XXXX
.Visible = True

Set IE = Nothing

End With
End Sub
[/CODE]

Anexo el codigo que me da el el explorador el la pagina donde deseo rellenar el texto " DESC" y dar buscar.

Agradezco quien tenga una idea de como puedo solucionar esto.

Gracias!

publicado
  • Autor

Agradezco y me de una mano con esto.

publicado
  • Autor

Nada ninguna idea? sera por el javascrip??

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.