lundi 7 août 2017

VBA to fill up website form and upload file path via "Browse" buttton

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...

  Function FillInternetForm()
   Dim IE As Object
  Set IE = CreateObject("InternetExplorer.Application")

   IE.Navigate "http://ift.tt/2hDiicp"

   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

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

Aucun commentaire:

Enregistrer un commentaire