You can use something like this, u just need again navigate browser with same 
link (test.com), I think It will open  a new blank form (see yellow part)

 

Sub test()

  

  Dim IEApp As New InternetExplorer

'  Set IEApp = CreateObject("InternetExplorer.Application")

  IEApp.Visible = True

  IEApp.Navigate "www.amazon.com" ' here is the real link, I will add it later

  Do: Loop Until IEApp.Busy = False

  Do: Loop Until IEApp.Busy = False

  With IEApp.Document

    Do: Loop Until .ReadyState = "complete" ' till here everything is fine

    

    

    For Each cel In Range("B5:B999") ' i tried this to make him search in range 
B for columns, but he is checking all columns at once, not one by one

    If cel = "x" Then ' if marked with x, he should start filling out the web 
form:

    

   

    .getelemenstbyid("SEL_SENSOR").selectedindex = 1

    .getelemenstbyid("TXT_TITEL").Value = ActiveCell.Offset(0, 3).Value  ' 
these are the automated fillings I already put them in, they worked. But he 
always uses the first row, not the row with an "x"

    .getelemenstbyid("TXT_BESCHREIBUNG").Value = ActiveCell.Offset(0, 4).Value

    .getelemenstbyid("adrEntwBezeichnungId").Value = ActiveCell.Offset(0, 
6).Value

    .getelemenstbyid("TXT_ADR_MODUL_ID").Value = ActiveCell.Offset(0, 8).Value

    .getelemenstbyid("SEL_BEWERTUNGS_INDEXE").selectedindex = 
ActiveCell.Offset(0, 5).Value

    

    .getelementbyid("IMG_REFRESHPROJEKTLISTE").Click ' this is the submit line, 
already works fine

   

    Do While IEApp.Busy Or IEApp.ReadyState <> READYSTATE_COMPLETE

    DoEvents

    Loop

    

    IEApp.Navigate "test.com"

 

Do While IEApp.Busy Or IEApp.ReadyState <> READYSTATE_COMPLETE

    DoEvents

    Loop

 

    

    

        

      ' after using a row with "x", he should now close the window, open a new 
one and start doing the same with the next row with an "x"

  End If

  

    Next

       

End With

  

 

 

End Sub

 

 

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On 
Behalf Of Indrajit $nai
Sent: Wednesday, May 28, 2014 5:07 AM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Need a small help in VBA coding

 

Hi All,

 

I just need a small favor from your end, please have a look at the code I have 
explained everything over there. My requirement is as follows;

 

Its just a popup with blank forms, the forms need to be filled with the data 
from row"x" and columns E-L

I already managed to "getelementbyid" from the source code and fill them with 
the text from columns E-L. this is not the problem. 

The problem is, that he always takes the data from the first row, even when 
there is no "x" in the B column.

 

Thanks in advance.


 

-- 
Indrajit
talk2indra...@gmail.com 

Disclaimer:
This electronic message and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you are not the intended recipient you are hereby notified that 
any disclosure, copying, distribution or taking any action in reliance on the 
contents of this information is strictly prohibited and may be unlawful. 

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel
 
FORUM RULES
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
 
NOTE : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to