Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Sub ConnectWeb()
  2. Dim ie As InternetExplorer
  3. Dim C
  4. Dim ULogin As Boolean, ieForm
  5. Dim MyPass As String, MyLogin As String
  6. Dim Linha As Integer
  7. Dim PN As String
  8. MyLogin = Application.InputBox("Por Favor entre com o Login", "Empresa", Default:="User", Type:=2)
  9. MyPass = Application.InputBox("Por favor entre com a senha", "Empresa", Default:="Password", Type:=2)
  10.  
  11. Set ie = New InternetExplorer
  12. ie.Visible = True
  13. ie.Navigate "http://url"
  14. Do Until ie.ReadyState = READYSTATE_COMPLETE
  15. Loop
  16. ie.Document.all("cuser").innerText = MyLogin
  17. ie.Document.all("cpass").innerText = MyPass
  18. ie.Document.getElementById("cent").Value = "BR"
  19.  
  20. ie.Document.forms(0).submit
  21. Do While ie.Busy
  22. DoEvents
  23. Loop
  24. PN = "D515005-5304"
  25. 'JavaScript to create file
  26. ie.Document.parentWindow.execScript ("printPL('" & PN & "','N%2FC','no')")
  27.  
  28.  
  29. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement