fotodj
08-07-2017, 06:50 PM
Here is where I am stuck, I was able to write simple code to open IE window and fill data from cells B1, C1, D1 in few fields of web form,
code also clicks check boxes but form has a button "browse" which opens up my computer window and when I choose image it will show path to that image in the form, how can I input that path which I have in cell A1...
How can I input that path with VBA line?
Example of values in my excel file :
A1 - C:\Users\BrDariusz\Desktop\Texan_N22NA.jpg
B1 - N22NA
C1 - North American T-6G Texan
D1 - KNTU
Function FillInternetForm()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.airport-data.com/aircraft/upload_quick.php?acid="
IE.Visible = True
While IE.busy
DoEvents
Wend
' ????? IE.document.All("picture").Value = ?????
IE.document.all("tail").Value = Sheets("Sheet1").Range("B1")
IE.document.all("desc").Value = Sheets("Sheet1").Range("C1")
IE.document.all("airport").Value = Sheets("Sheet1").Range("D1")
IE.document.all("terms").Click
IE.document.all("terms2").Click
End Function
code also clicks check boxes but form has a button "browse" which opens up my computer window and when I choose image it will show path to that image in the form, how can I input that path which I have in cell A1...
How can I input that path with VBA line?
Example of values in my excel file :
A1 - C:\Users\BrDariusz\Desktop\Texan_N22NA.jpg
B1 - N22NA
C1 - North American T-6G Texan
D1 - KNTU
Function FillInternetForm()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.airport-data.com/aircraft/upload_quick.php?acid="
IE.Visible = True
While IE.busy
DoEvents
Wend
' ????? IE.document.All("picture").Value = ?????
IE.document.all("tail").Value = Sheets("Sheet1").Range("B1")
IE.document.all("desc").Value = Sheets("Sheet1").Range("C1")
IE.document.all("airport").Value = Sheets("Sheet1").Range("D1")
IE.document.all("terms").Click
IE.document.all("terms2").Click
End Function