Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21843

pass value from vb6 to html and java...

$
0
0
Actually i have the html page(see attached) and i passing value from excel cell in the html page, click CALCOLA and get the related result.

But is possible to exctract the jave script and integrate into vb6 project?


Code:

Option Explicit
Sub LOOP_IBAN()

Dim RIGA As Long, WB, DOC, C, ELE, WS As Worksheet

Set WS = ThisWorkbook.Sheets("STEP_1")

Set WB = CreateObject("internetexplorer.application")
WB.navigate2 "C:\TEMP\calcolocin.htm"

Do Until WB.readyState = 4
    DoEvents
Loop

RIGA = 2

WB.Visible = True

Set DOC = WB.document

Do While Not WS.Range("A" & RIGA).Value = ""

If Not WS.Range("AC" & RIGA).Value = "" Then

    DOC.all("J8").Value = Format(WS.Range("AD" & RIGA).Value, "00000")
    DOC.all("J9").Value = Format(WS.Range("AE" & RIGA).Value, "00000")
    DOC.all("K1").Value = Format(WS.Range("AF" & RIGA).Value, "000000")
   
    For Each ELE In DOC.getelementsbytagname("input")
        'Debug.Print ele.Name
        If ELE.Value = "Calcola CIN e IBAN" Then ELE.Click: Exit For
    Next
   
    Do Until DOC.all("K1").Value > ""
        DoEvents
    Loop
   
    WS.Range("AG" & RIGA).Value = DOC.all("cin1").Value
    WS.Range("AH" & RIGA).Value = DOC.all("iban1").Value
   
    End If
   
    RIGA = RIGA + 1
    DoEvents
   
Loop

Set WS = Nothing
WB.Close
Set WB = Nothing

End Sub

Attached Files

Viewing all articles
Browse latest Browse all 21843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>