Hello Team,
I need to upload a file to Website(my companies website as per business requirement)
Just for an Example... lets say... http://www.icoconverter.com
{Taking this website as an example so that I quetion will be cler to all}
On Webpage we have TextBox(to show file path) and "Browse" button.
When we click on browse button, OpenFile Dialog box is shown and user need to select the file and then File Path is being shown in TextBox.
And after the we can click on Convert button and File gets uploaded to server.
Problem/Issue: Is it possible that without clicking on 'Browse' button I can take path in Textbox?
I have done below working...
Private Sub CommandButton1_Click()
Dim ie As New InternetExplorer
Dim txtBox As Variant
Dim path As String
ie.Visible = True
ie.Navigate "http://www.MyTestWebsite.com"
Do While ie.Busy
Application.Wait (Now + TimeSerial(0, 0, 2))
Loop
path = "C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg"
txtBox = ie.Document.getElementsByName("image")
txtBox.Value = path
End Sub
Please help....