Try the following code:
Private Sub AcessarSite()
Dim driver As InternetExplorer
Dim elem As HTMLBaseElement
Dim url As String
url = "https://www.newspace.com.br/pan/"
Set driver = New InternetExplorer
driver.Visible = True
driver.Navigate url
Set doc = driver.document.frames
Set doc1 = doc.frames("Principal")
doc1.document.getElementById("Usuario").innerText = "USUARIO CORRETO"
doc1.document.getElementById("Senha").innerText = "SENHA CORRETA"
doc1.document.getElementById("Ok").Click
Set driver = Nothing
End Sub
I tested here and it worked, the problem was really with the frames.
Good morning Marcelo, thank you very much for the response and dedication to the theme, unfortunately I am not able to set the login on the site, it gives me an error -> "Error at runtime '91': The variable of the object or the variable of the block 'With' was not defined". i tried to use the code with Xpath "//*[@id='Usuario']" and with "html/body/form#f/table/tbody/tr/td/iframe/html/body/form#f/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr/td/input#Usuario" but both return the same error
– M. Marins
also does not run, it gives as "Error at runtime '424': The object is required", it seems that to access this field I would have to access some iframe, but even trying to access these iframes it still does not locate the login field
– M. Marins
Instead of ie, try driver, sometimes it is giving error by assuming ie as internet explorer and not a variable
– MarceloPBG
I’m sorry Marcelo, but I don’t quite understand what you said.
– M. Marins
see the edited response
– MarceloPBG
Perfect Marcelo, thank you very much my friend, I was already going crazy with it. Let’s go to other challenges now... vlw
– M. Marins