Hi every one, I'm hoping someone on here can help me.
I'm using an online google site that allows you to upload files, which are linked to Dropbox, which is then linked to my google drive, allowing direct uploads to my google drive if you have the website address
I'm familiar with vba's but i'm completely lost with this. I'm hoping to have a vba which will select the "choose file button", past a predetermined path or file name into the pop up browse window and then have the vba hit enter, and proceed to click the submit button. Is this possible ?
Below is my current code as well as the website address. As you'll see the website is super-basic so it should be to hard right ? Im lost any insight would be great.
Dim HTMLDoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Sub Upload()
Dim MyHTML_Element As IHTMLElement
Dim MyURL As String
On Error GoTo Err_Clear
MyURL = "https://script.google.com/macros/s/AKfycbznalI3P2XuT5PubzdP7XJ_6X3tneK4Xjhlss_RVum-eCeJUkU/exec"
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.navigate MyURL
MyBrowser.Visible = True
Application.Wait Now() + TimeValue("00:00:05")
Do
Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
Set HTMLDoc = MyBrowser.document
HTMLDoc.all.myName.Value = "NAME" 'Name here
For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
If MyHTML_Element.Type = "Submit" Then MyHTML_Element.Click: Exit For
Next
Err_Clear:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End Sub
Below is the link to the site
https://script.google.com/macros/s/AKfycbznalI3P2XuT5PubzdP7XJ_6X3tneK4Xjhlss_RVum-eCeJUkU/exec
I'm using an online google site that allows you to upload files, which are linked to Dropbox, which is then linked to my google drive, allowing direct uploads to my google drive if you have the website address
I'm familiar with vba's but i'm completely lost with this. I'm hoping to have a vba which will select the "choose file button", past a predetermined path or file name into the pop up browse window and then have the vba hit enter, and proceed to click the submit button. Is this possible ?
Below is my current code as well as the website address. As you'll see the website is super-basic so it should be to hard right ? Im lost any insight would be great.
Dim HTMLDoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Sub Upload()
Dim MyHTML_Element As IHTMLElement
Dim MyURL As String
On Error GoTo Err_Clear
MyURL = "https://script.google.com/macros/s/AKfycbznalI3P2XuT5PubzdP7XJ_6X3tneK4Xjhlss_RVum-eCeJUkU/exec"
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.navigate MyURL
MyBrowser.Visible = True
Application.Wait Now() + TimeValue("00:00:05")
Do
Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
Set HTMLDoc = MyBrowser.document
HTMLDoc.all.myName.Value = "NAME" 'Name here
For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
If MyHTML_Element.Type = "Submit" Then MyHTML_Element.Click: Exit For
Next
Err_Clear:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End Sub
Below is the link to the site
https://script.google.com/macros/s/AKfycbznalI3P2XuT5PubzdP7XJ_6X3tneK4Xjhlss_RVum-eCeJUkU/exec