Excel macro -> browse file -> select file
Closed
Tobie OVerdijk
-
Apr 18, 2010 at 06:38 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 21, 2010 at 06:13 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 21, 2010 at 06:13 AM
Related:
- Excel macro -> browse file -> select file
- Windows 10 iso file download 64-bit - Download - Windows
- Kmspico zip file download - Download - Other
- Tiny 11 iso file download - Download - Windows
- Messenger file downloader - Guide
- Kali linux iso file download 64-bit - Download - Linux
8 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 18, 2010 at 09:25 AM
Apr 18, 2010 at 09:25 AM
could you put a sample file with code. This is partial code, and is not enough to see what can be issue. Also what version of excel you have. You can put the file at some share site like https://authentification.site and post back the link here
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 19, 2010 at 02:58 AM
Apr 19, 2010 at 02:58 AM
Your issue is here
If UCase(objInputElement.Type) = "FILE" Then
Application.Wait (Now() + TimeValue("00:00:01"))
objInputElement.Focus
Application.Wait (Now() + TimeValue("00:00:01"))
'objInputElement.Click
' Application.Wait (Now() + TimeValue("00:00:03"))
SendKeys sFile
The send keys does not work. HTML form element "FILE" does not allow a value to be set. I have never used IMACRO but they say that it is good for type of things that you are seeking to do, In fact the web site where you are uploading the image is also gives a sample code for that. Here is the website for it
http://www.iopus.com/imacros/
By the way semi automate way would be if you make this change. In this case you have to select the file yourself, but the file selection dialogbox would open up
If UCase(objInputElement.Type) = "FILE" Then
Application.Wait (Now() + TimeValue("00:00:01"))
objInputElement.Focus
Application.Wait (Now() + TimeValue("00:00:01"))
objInputElement.Click
Application.Wait (Now() + TimeValue("00:00:03"))
'SendKeys sFile
If UCase(objInputElement.Type) = "FILE" Then
Application.Wait (Now() + TimeValue("00:00:01"))
objInputElement.Focus
Application.Wait (Now() + TimeValue("00:00:01"))
'objInputElement.Click
' Application.Wait (Now() + TimeValue("00:00:03"))
SendKeys sFile
The send keys does not work. HTML form element "FILE" does not allow a value to be set. I have never used IMACRO but they say that it is good for type of things that you are seeking to do, In fact the web site where you are uploading the image is also gives a sample code for that. Here is the website for it
http://www.iopus.com/imacros/
By the way semi automate way would be if you make this change. In this case you have to select the file yourself, but the file selection dialogbox would open up
If UCase(objInputElement.Type) = "FILE" Then
Application.Wait (Now() + TimeValue("00:00:01"))
objInputElement.Focus
Application.Wait (Now() + TimeValue("00:00:01"))
objInputElement.Click
Application.Wait (Now() + TimeValue("00:00:03"))
'SendKeys sFile
Hey, thanks for the help! i got further.
now the browse window pops up but it does not select/open captcha.jpg
now the browse window pops up but it does not select/open captcha.jpg
Didn't find the answer you are looking for?
Ask a question
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 19, 2010 at 04:45 PM
Apr 19, 2010 at 04:45 PM
I would be very interested in knowing how you were able to get past this point? You said that you were able to get past this point right ? So you were able to use the sendkeys or you opted for some alternative form?
I worked it out by replacing the code part you told me to,
Yet i still have the issue that it does not select captcha.jpg and opens it
Yet i still have the issue that it does not select captcha.jpg and opens it
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 21, 2010 at 06:13 AM
Apr 21, 2010 at 06:13 AM
how? what u changed