Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#62626
Bom dia

Estou com uma dificuldade de um site para lançar as informações em uma caixa de texto do site já tentei de todas as formas mais ele não preencher se não foi digitando ou selecionando e colando poderiam de dar um help?

Sub Emissao_Alvara()

Dim oHTML_Element As IHTMLElement
Dim sURL As String
sURL = "http://www.sefaz.salvador.ba.gov.br/Alv ... #gsc.tab=0"
Set oBrowser = New InternetExplorer
oBrowser.Silent = True
oBrowser.Navigate sURL
oBrowser.Visible = True

Do
Loop Until oBrowser.ReadyState = READYSTATE_COMPLETE

Set HTMLDoc = oBrowser.Document

HTMLDoc.all.ctl00_ContentPlaceHolderPrincipal_txtNuCnpj.Value = Range("B1")
HTMLDoc.all.ctl00_ContentPlaceHolderPrincipal_txtNuCGA.Value = Range("D1")
HTMLDoc.all.ctl00_ContentPlaceHolderPrincipal_txtNuCpfRepresentante.Value = Range("D1")
HTMLDoc.all.ctl00_ContentPlaceHolderPrincipal_BtnConsultar0.Click

End Sub
#62679
Você não esta conseguindo porque os elementos estao num IFrame bloqueado para acesso, se nao estivesse bloqueado bastava fazer isso:
Código: Selecionar todos
Set HTMLDoc = oBrowser.document.frames.Item(0).document
Tente fazer a rotina na página abaixo, é pra onde o IFrame bloqueado direciona.
Código: Selecionar todos
https://servicosweb.sefaz.salvador.ba.gov.br/WebsiteV2/Sistemas/AlvaraCgaInternet/Modulos/Principal/AlvaraCgaEmissaoFrm.aspx?opEmissao=A
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord