Consulting

Results 1 to 6 of 6

Thread: #Click in Botton of Web Site whith VBA Excel 2007

  1. #1
    VBAX Newbie
    Joined
    Sep 2014
    Posts
    5
    Location

    #Click in Botton of Web Site whith VBA Excel 2007

    Dear, good afternoon!
    Can you help me?
    Must click a button on a website, but can not.
    Below is the source code of the page:

    '<TD class=clsCampo2 align=left><SPAN id=DetalhesProposta1_lblPropostaD>Proposta Mapfre</SPAN>: </TD>
    <TD style="WIDTH: 300px" align=left><SPAN id=DetalhesProposta1_lblPropostaDValue>10407846860628243</SPAN>&nbsp; <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=DetalhesProposta1_lnkbtnDocumentoEletronico onclick="window.open('/EntradaPropostas/ImprimirProposta.aspx?NumeroNSU=10407846860628243','', 'resizable=no, menubar=no,scrollbars=yes,width=100,height=100');" src="../Imagens/print.gif" type=image name=DetalhesProposta1$lnkbtnDocumentoEletronico> </TD>
    <TD style="BACKGROUND-COLOR: #eee" colSpan=2 align=middle><SPAN id=DetalhesProposta1_lblPropostaConciliadaD>Proposta Conciliada com TronWeb</SPAN>: </TD></TR><TD class=clsCampo2 align=left><SPAN id=DetalhesProposta1_lblPropostaD>Proposta Mapfre</SPAN>: </TD>
    <TD style="WIDTH: 300px" align=left><SPAN id=DetalhesProposta1_lblPropostaDValue>10407846860628243</SPAN>&nbsp; <INPUT style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" id=DetalhesProposta1_lnkbtnDocumentoEletronico onclick="window.open('/EntradaPropostas/ImprimirProposta.aspx?NumeroNSU=10407846860628243','', 'resizable=no, menubar=no,scrollbars=yes,width=100,height=100');" src="../Imagens/print.gif" type=image name=DetalhesProposta1$lnkbtnDocumentoEletronico> </TD>
    <TD style="BACKGROUND-COLOR: #eee" colSpan=2 align=middle><SPAN id=DetalhesProposta1_lblPropostaConciliadaD>Proposta Conciliada com TronWeb</SPAN>: </TD></TR>'

    I am use below macro code:

    .document.getelementByID("DetalhesProposta1_lnkbtnDocumentoEletronico").cli ck

    But dont funcion

    Can help me?

  2. #2
    possibly you would need to fire the onclick event, which may not happen, clicking the button by code

  3. #3
    VBAX Newbie
    Joined
    Sep 2014
    Posts
    5
    Location
    Quote Originally Posted by westconn1 View Post
    possibly you would need to fire the onclick event, which may not happen, clicking the button by code


    You cant help me?

    what code to click in button?

  4. #4
    as i can not test, you can try
     .document.getelementByID("DetalhesProposta1_lnkbtnDocumentoEletronico").fireevent "onlick"

  5. #5
    VBAX Newbie
    Joined
    Sep 2014
    Posts
    5
    Location
    Quote Originally Posted by westconn1 View Post
    as i can not test, you can try
     .document.getelementByID("DetalhesProposta1_lnkbtnDocumentoEletronico").fireevent "onclick"
    My friend, dont function.
    Error 91.

    You Cant help me?

    Thanks.

  6. #6
    i am not surprised it does not work when you only post a small part of the problem
    you did not say in your original post in this forum that you were getting an error of any type

    this thread is x posted at http://www.vbforums.com/showthread.p...th-Id-and-Name
    and possibly others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •