This is "THE BEST" video available on the internet.The way he explains things is just REMARKABLE. Not only he covers the entire vba concept from MICROSOFT if not way too oo better. . "BHUTH CHUKRIA" - A big thank you from India. You are THE BEST
@WiseOwlTutorials3 жыл бұрын
Thank you for the lovely comment!
@chamberlianferreira45786 ай бұрын
YEARS LATER AND YOUR ARE STILL, SIMPLY THE BEST!!!! Don't how I can thank you more!
@WiseOwlTutorials6 ай бұрын
Happy that the video helped, thanks for watching!
@szilkov3 жыл бұрын
Wow! Thank you! This was exactly what I needed to finalise a roughly 90 min task to one click and 53 seconds. Easy to understand, easy to follow self explanatory instructions.
@WiseOwlTutorials3 жыл бұрын
Happy to hear that you found it useful, thanks for watching and for taking the time to leave a comment!
@charliesk62395 жыл бұрын
This is Gold, Boss - without a doubt. Many thanks Mr. Gould Sir. I much appreciate the depth you go into to make the app complete and to cover so many bases.
@maurocastagnera89497 жыл бұрын
Dear Andrew, I still can not understand all that you teach, either because I do not understand your language very well and because I'm still at a basic level with VBA, but one thing I've known very well for a long time is that you're really a genius! When I look at your videos and understand the extraordinary talent you have, I keep thinking about how important people like you are, thanks to which the community can learn and advance in its knowledge. God bless you and make you get all the success you deserve in your professional life. My deep appreciation and gratitude comes to you.
@slicedbreadgames1315 жыл бұрын
He sure is Boss!
@SuperChikna4 жыл бұрын
Very helpful. I am new to Macro and only needed to see this till 20:44 to get a hang of it. Thanks Team.
@andresff05 жыл бұрын
Andrew, again, thanks for your outstanding work. With a combination of your other lessons and this one I was able to create a Macro to automatize the download of several PDF files per time for the users on my job. Soon, I hope I can donate to your project.
@WiseOwlTutorials5 жыл бұрын
You're welcome Andrés! Thank you for taking the time to leave a comment - it's always nice to know when the videos have helped people in their work!
@daves40264 жыл бұрын
I thank you for this awesomely deep tutorial. I always learn from your videos. Please keep the great work up, God bless you
@roshank96 жыл бұрын
Great. First time i have learned that even with VBA you can download the file. I tested too. Works great. Thank You:)
@khurramghori22317 жыл бұрын
Hi, I ran the code at 18:29 and my MS Excel crashes, please advice. Thanks
@DM-py7pj4 жыл бұрын
Long time since I watched all these but if memory serves what is missing from this excellent series is coverage of queryselector/querySelectorAll, and the css selectors/pseudo-classes/combinators which can be used in VBA. Modern browsers are optimised for css, and, with some notable limitations, can be deployed with great flexibility across early-bound MSHTML.HTMLDocument when parsing HTML.
@andrefmartin3 жыл бұрын
Fantastic video lesson! Very helpful. I have a question: How to download from web page a graphic, which is not a physical file but result on the screen got from another URL src ? I.e, how can we capture part of a screen in a web page, and download it locally as a image file via VBA ? I'm not finding answer to this challange so far
@WiseOwlTutorials3 жыл бұрын
Hi Andre! I think that you might find it easier to do this using Google Chrome rather than Internet Explorer. We have some videos on using Google Chrome starting from part 57.1 in this playlist kzbin.info/aero/PLNIs-AWhQzcl3xKvF8sVL4sWRWICj_clM The SeleniumBasic library has a TakeScreenshot method - here's a very basic example of how it works: Private cd As Selenium.ChromeDriver Sub GetScreenShot() Set cd = New Selenium.ChromeDriver cd.Start cd.Get "www.wiseowl.co.uk" 'Screenshot entire browser window cd.TakeScreenshot.SaveAs "C:\Wise Owl\Image1.jpg" 'Screenshot specific element cd.FindElementByCss("#cycler").TakeScreenshot.SaveAs "C:\Wise Owl\Image2.jpg" End Sub I hope that helps!
@milindkhot7682 жыл бұрын
The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe atribute. - This compile error is coming while declaring API of urldownloadtofile
@WiseOwlTutorials2 жыл бұрын
Hi! You might find these two links useful docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/declare-statement docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/ptrsafe-keyword
@FajnyLarry3 жыл бұрын
How to make FUNCTION works on 64-bit systems?
@sudeepagrawal4047 жыл бұрын
Followed this video until 19:58 and I get an error message popup indicating : Run-time error: '453' Can't find DLL entry point URLDownloadToFileA in urlmon.dll.Can some one please help me.
@slicedbreadgames1315 жыл бұрын
I got the same error... Shot in the dark, but did you double-click on the title for this text on its page? If so, there's an extra space at the end of it. and if you placed this into your code, that one little extra space invalidates the Alias. Did you check your system32 folder to see if you have the dll?
@vladlemos7 жыл бұрын
Hi Andrew, thanks a lot for sharing! just amazing, congrats! the best explanation that I ever seen!
@hadireg7 жыл бұрын
WOW the first time I know mid function returns the string to its very right end from the starting position!!! maan, I've been using VB since year 2000 :D
@maheshakaurigadde39715 жыл бұрын
How do I download the bank statement using VBA macro???
@techsalesforce4 жыл бұрын
Hi Andrew, When declaring the URLDownloadToFile function, I get an error saying that I should update my declaration to attend to 64 bit. Is there a 64 bit version of that line of code that I can use?
@jackalcock39074 жыл бұрын
Option Explicit #If Win64 Then Public Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" () #End If This fixed the error for me.
@kashifkhanspecial8 жыл бұрын
Hi Andrew, Thank you so much for this lovely video tutorial, God bless you.
@bipinmakwana72463 жыл бұрын
What if Site needs to put captcha everytime for each files ?
@yashsomaiya81414 жыл бұрын
Hi I have one question why didn't you make even a single video MS Access macro?
@RupeshKumar-ms8bl4 жыл бұрын
Hey, Thanks for this tutorial. Can you please make a video to upload an image file to a server. Using POST multipart/form-data
@amrutchitragar30144 жыл бұрын
Sir How to write VBA code to download a file sitting behind a JavaScript link? In ie automation
@BasBruijnis6 жыл бұрын
Hi Andrew, I get this error on function declaration, text also turns red --> *Private declare function URLDownloadTofile Lib "urlmon"* Compile error: The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute. Any ideas how to fix this? Best regards, Bas
@slicedbreadgames1315 жыл бұрын
You have no name for your function. E.g. Private declare function URLDownloadTofile {function_name} Lib "urlmon"
@曾忠凱2 жыл бұрын
Simply adding a "PtrSafe" worked for me: Public Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ()
@playstorelaxman27mail205 жыл бұрын
Instead of URL there is JavaScript_postback enable href can you help on this situation
@tomaszpietowski70104 жыл бұрын
very nice video and well done! It is very good explained! Thank you!
@chandrut3154 Жыл бұрын
Hiii, I am doing one exercise in VBA. I have completed it partially. Can you Do a video to access a SharePoint a links which is present in a single Excel and the Excel which contains the SharePoint links is also kept in one SharePoint link
@cedrois2 жыл бұрын
thank you very much for that video the first 20min on how to Download a file was what I was looking for. However, your code is not taking in consideration when the browser ask to save or open the file once you click the download button. It will download the file only if there is no popup that happen. Otherwise, it do nothing ( the macro can be run but nothing is downloaded because it is prevented by the popup ) I searched everywhere on the Internet for an answer on how to VBA code this aspect but no clear answer. So my question is: How can we implement this function into your code? How can VBA automatically click on the save button when the popup happen on the browser side?
@WiseOwlTutorials2 жыл бұрын
You're welcome John, I'm glad that some of the video was useful to you! I don't have an answer to clicking the save on a popup - it's not exposed to VBA via the IE library (you'll find the same is true for Chrome if you use Selenium). Sorry I can't help with that.
@ninjabomberboy83867 жыл бұрын
Hi Andrew, Loving your VBA lessons! I was wondering if you could tell me how to log into a website using this method and then start scraping? I have noticed that with the MSXML2.XMLHTTP60 .open function, there is an option to put in a username and password, is this the key to logging in? (it doesn't seem to work for me) Thank you!
@huonggiang5372 жыл бұрын
Dear Andrew, In case the url is a request with Authorization header for login, is there a way to download the file? many thank
@SaulLeighton2 жыл бұрын
Thanks for your video WiseOwl. Have you had a chance to adapt the code to Windows 11 64-bit, running the latest 64-bit Office (Microsoft® Excel® for Microsoft 365 MSO (Version 2203 Build 16.0.15028.20152) 64-bit) ?? The download part no longer seems to work.
@WiseOwlTutorials2 жыл бұрын
Hi Saul! Sorry no I haven't had time to play with Windows 11 yet I'm afraid.
@gangendiranmaths60754 жыл бұрын
Hi , Am very new to the VBA macro and am into my first project. I have used ms internet control and ms HTML object references to automate the internet explore. Am done with all the required criteria like navigate to URL and click and choose the required things. All I need to do is , How to make a code to wait until the download complete since the download size different I can't use the wait option. Once download completed I need to save it and loop through the another things. Any suggestions and help. Thanks in advance.
@jaywilliams34237 жыл бұрын
Hi I was wondering is there a way to use a similar method to upload a file to a website?Thanks
@elricho722 жыл бұрын
Great Video ! 😀
@WiseOwlTutorials2 жыл бұрын
Thanks Richo!
@kennyenoshmanova54264 жыл бұрын
first of all thank you for this video, can we get the excel file what you worked on.
@WiseOwlTutorials4 жыл бұрын
You certainly can! You'll find a link in the description below the video to the page on the Wise Owl website where you can download the file. I hope that helps and thanks for watching!
@zankrizanovski12828 жыл бұрын
Is there any way that you can also pass 2 parameters to log in, and then download the file as shown in the video?
@rishabhjain37084 жыл бұрын
Hello Sir, Could you please help with some code to click an angular button on a website using VBA? Regards, Rishabh Jain
@alexandrazettervall86412 жыл бұрын
Very helpful video, but my excel crashes and restarts when I try to run the part 18 min into the video (testing downloading the file the first time). I suspect that it's due to excel being run in Citrix and I probably don't use a correct DestinationFile url... Any pointers to solve it when I don't seem to be able to save to urls such as C:\Temp ?
@WiseOwlTutorials2 жыл бұрын
Hi Alexandra! Sorry I'm not familiar with working in Citrix. My first port of call for help with this type of issue is Stackoverflow stackoverflow.com/search?q=vba+citrix&s=fc1338ef-72d5-4149-80b8-df24f3ab0809 I hope it helps!
@dunnobe5 жыл бұрын
Thank you for your tutorial. It helped me exacly with what I wanted to achieve.
@WiseOwlTutorials5 жыл бұрын
You're welcome, happy to hear that it helped and thanks for watching!
@dunnobe5 жыл бұрын
@@WiseOwlTutorials Do you happen to have a tutorial on API? I would want to connect to the website/database of the IMF and download data there.
Hi guys, It appears a saving message box from explorer, how do i continue? i've tried using sendkeys, apis..but nothing....anyone ?
@何维涛2 жыл бұрын
good to see this video ,it's very usefull for me !
@WiseOwlTutorials2 жыл бұрын
Happy to hear that, thank you for watching!
@mustafabakkal85518 жыл бұрын
can we get the directlu codes
@nicolasrogeliosierraroca81957 жыл бұрын
I like to learn how download a file from a taxes web page, I´m from mexico and I´d like learn how to do a code... another words... I want scrap a web page contains a xml files and save its on my computer... is possible?
@selfsage17 жыл бұрын
Hii how to download .csv file to excel in the same sheet than copying in a destination folder! thanks
@slicedbreadgames1315 жыл бұрын
I would try the "QueryTables.Add" method. It has a lot of ways to delimit (i.e. common one, ."TextFileCommaDelimiter = True"). This way, as long as you have access, it limits the coding you have to do, and less exhaustive on your resources.
@KuldeepSingh-nq1vi3 жыл бұрын
Hi Andrew, how to capture file name of downloaded excel file or how to open downloaded excel file, please make a video on same.
@WiseOwlTutorials3 жыл бұрын
Hi Kuldeep! If you're using the URLDownloadToFile method then you get to choose the file name and location!
@robertobermaier25943 жыл бұрын
I just tried to use your vba code to download a file from an internal company connext page. It unfortunately downloads only 4kB of the 1MB file. A simple click on the link which I placed in a worksheet opens a download dialog of the Internet explorer and if I manually click on the save button it downloads completely. Any idea what I can do to get it automated?
@WiseOwlTutorials3 жыл бұрын
Hi Robert! I'm not sure on this one, there's a suggested answer here which seems plausible stackoverflow.com/questions/39952086/vba-code-to-wait-until-file-download-from-ie-is-complete I haven't tried it but it might help!
@itsmemohit5 жыл бұрын
Hi, the downloaded file is showing only 4kb, regardless of which file i choose to download from a given sharepoint page?
@anjarsaputra79093 жыл бұрын
is there any tutorial how to upload file automate in IE?
@WiseOwlTutorials3 жыл бұрын
Hi Anjar, sorry but we don't have a tutorial on that topic at the moment.
@savaishra7 жыл бұрын
Hi Andrew, Thanks for the tutorial. Does the same method you have posted above, is suitable for download files from a PLM? If not, can you provide instructions for download all files from a PLM? I have to download 2000 files having respective unique identification number from PLM. Thanks in advance
@axelamoe2 жыл бұрын
I am downloading a pdf file from a secure website after logging in and getting the link, however the downloaded file always seems to be corrupt and nothing shows or opens! Any ideas?
@WiseOwlTutorials2 жыл бұрын
I'm sorry I don't know the answer to that one!
@krn142428 жыл бұрын
Thanks Andrew, Excellent video. Cheers!
@yasserahmed74402 жыл бұрын
Thanks for your great video. Your code works well with normal links but when the image url starts with "blob",it give me error. How can I download these images? please help me.
@WiseOwlTutorials2 жыл бұрын
Sorry Yasser, I don't know. Did you find a solution?
@yasserahmed74402 жыл бұрын
@@WiseOwlTutorials Not yet
@nhatminh14853 жыл бұрын
Hi add. Can you show me how to upload files to the web?
@WiseOwlTutorials3 жыл бұрын
Hi there! I have this topic on my To Do list but I'm not sure when I will be adding this video.
@abbegaetan73284 жыл бұрын
Hi Andrew, Thank you for this video tutorial. I would like to automatically download excel files from SharePoint subfolders. The folders and subfolders do not exist already. People can create folder and upload excel file (A checklist). Can you help me please?
@travllingisfun61894 жыл бұрын
Can we download pdf from web using VBA script..
@DM-py7pj4 жыл бұрын
yes
@srutikulanthaivel10483 жыл бұрын
Hi @WiseOwlTutorials, I have a problem when I run this exact code. "Acrobat could not open '[name of file]' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)" I need to download PDFs and I also need the code to pick these URLs from a code. Can you please help me here? First I want to solve this error.
@srutikulanthaivel10483 жыл бұрын
I also need the code to pick these URLs from a range of cells on the Excel file**
@WiseOwlTutorials3 жыл бұрын
Hi Sruti, sorry but I don't know the answer to that one.
@chobblegobbler66715 жыл бұрын
Hi Andrew, Must Javascript be turned on in IE for this exercise?
@mohamedelgendy46034 жыл бұрын
I need a help in this vba code please I have 2 sheets and there is column w in sheet1 has a hyperlink value linked to sheet 2 and I need when I click in any value of these hyperlinks in this coulmn (move me in sheet2 and make filter with the value I clicked in sheet1) my problem My code make filter with static value sheet1a1 while I need the value of active cell in sheet1 Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Sheet2.Range(Sheet2.Range("A1"), Sheet2.Range("A" & Rows.Count).End(xlUp)).AutoFilter Field:=1, Criteria1:=Target.Name End Sub
@UpYours1017 жыл бұрын
jw, did you ever do a video on vba api's? or scrapping/emulating a desktop application or screen? just looking for new projects to learn. thank you
@UpYours1017 жыл бұрын
WiseOwlTutorials i understand completely, thanks for the follow-up and the vids
@johntelly17895 жыл бұрын
Hi Andrew, Thank you for the videos and the great explanations. I downloaded the files for this video and when I unzipped them, my anti-virus software detected a Trojan. Would you know why this could be? Also, has anyone else encountered a similar problem? Thanks
@sim77178 жыл бұрын
Another unique one. Awesomely nice.
@IronMoe7 жыл бұрын
Hi, im a newbie in VBA and still learning as of now, may i request for your kind assistance. I want to automate to a PDF file from a website with user name and password. And will save the PDF file to my desktop folder. Is that possible?
@IronMoe7 жыл бұрын
Thank you for you effort to answer my question. :-)
@bilalshah05056 жыл бұрын
Hi Sir.. i need your help in creating a program that uploads a file to webpage. The input type file element in browser does not support directly setting up the file path. I have a workaround using vbs script and send keys but does not really look good to me. You help is appreciated if u would loke to show how to set the valie of input type file in a browser with file name in the best possible way. Regards Bilal shah
@KhalilYasser5 жыл бұрын
Thank you very much my tutor for this incredible tutorial. Why in module `m_ProcessVideoPages` you declared the variable `htmlCell` as IHTMLElement3 and not as IHTMLElement3. Is there a difference or this is just the same ?
@WiseOwlTutorials5 жыл бұрын
Hi Yasser, you can read a little about this here stackoverflow.com/questions/13016084/in-mshtml-what-do-the-numbers-mean-like-in-ihtmlelement7 and here stackoverflow.com/questions/9619502/what-happens-when-using-ihtmlelement5-6-for-ie8-9-in-ie6-7-does-it-divert-to I hope that helps!
@axelamoe2 жыл бұрын
I am getting an error 453 can’t find dll entry point for UrlDownloadfilea urlmon any help?
@WiseOwlTutorials2 жыл бұрын
I'm not sure if this is just a typo in your comment but it should be urldownloadtofilea rather than urldownloadfilea
@axelamoe2 жыл бұрын
@@WiseOwlTutorials Yea you are right I wrote it out wrong. I got it fixed but still getting the corrupted file I feel like because it is a secure website, it is blocking selenium. Thank you
@josephsstudio91343 жыл бұрын
Any idea on how to avoid MBAM Generic Exploit error when saving?
@WiseOwlTutorials3 жыл бұрын
Hi, I'm not sure, is that a Malware Bytes message? If so I would try altering the settings as described in this thread forums.malwarebytes.com/topic/265085-microsoft-office-word-saying-malwareexploitgeneric/ I hope that helps!
@josephsstudio91343 жыл бұрын
@@WiseOwlTutorials It was an MBAM message. I ended up changing my antivirus to another one, then found a way to download (with login credentials) without using an API. It's a little dirty, per se, but it gets the job done. I learned that the URLDownloadToFile is only a GET method so I couldn't login using it. Even with other login procedures. So thank you. Basically I open IE11, login (elementID), iterate through my sheet the URLs to open and save the file using SendKeys. Like I said, a little dirty, but right now, it works.
@WiseOwlTutorials3 жыл бұрын
@@josephsstudio9134 Cool! If it works then I guess that's the most important thing. Thanks for taking the time to let us know how you solved your problem, hopefully it will help others too!
@josephsstudio91343 жыл бұрын
@@WiseOwlTutorials I hope so. It's still a little broken at times if I run it over 200 entries (array needed ReDim). Hopefully I can move it to away from IE11 since IE11 won't be supported later this year.
@WiseOwlTutorials3 жыл бұрын
@@josephsstudio9134 Just in case it helps, I made some videos on how to use Google Chrome with Excel VBA recently. I don't have a specific video on downloading files yet but you might find this playlist helpful (the Chrome videos start at part 57.1) kzbin.info/aero/PLNIs-AWhQzcl3xKvF8sVL4sWRWICj_clM
@emrezkc2 жыл бұрын
such valuable info
@WiseOwlTutorials2 жыл бұрын
Thanks!
@wajidazeemfy7 жыл бұрын
Hi Andrew If I run the routine (at 18:35 in video) I get "Run-time error '453': Can't find DLL entry point URLDownloadedtoFileA in urlmon". and the line that calls the function gets highlighted in yellow. Please advise solution...
@sudeepagrawal4047 жыл бұрын
I get the same error, even without the typing mistake.
@axelamoe2 жыл бұрын
Did you get this figured out I am getting the same error?
@wajidazeemfy2 жыл бұрын
No.. no solution with me...
@nsrchndshkh7 жыл бұрын
Hi Wise Owl, Thanks for all the videos. Would you upload video on "How to upload files on website e.g (Yammer) using VBA?"
@slicedbreadgames1315 жыл бұрын
I would love to ask him this! Maybe you can put the DestinationURL as the actual website directory it'll be stored in. I know with Office products, another was to open a, say Word doc, if you have access, you can just plug the whole URL into the open dialog box (blahblah/thispage/wordfile.docx), then it'll be unsaved in your Temp IE files (most likely), and it's read-only until you save it...
@iamsopure10437 жыл бұрын
Hi Andrew. My situation is that I need to select several values (such as client name and reporting period) from a couple of drop down lists in a web page and then download. I am wondering if you have idea how I can possibly pass an option value into the drop down list? The HTML code is some thing like below: Client_Name_1 Client_Name_2 Client_Name_3 Thank you so much!
@iamsopure10437 жыл бұрын
***** Thank you Andrew.
@merchant27307 жыл бұрын
Hi, I am trying to download a csv file but once it downloads, the content within the file turns into HTML jibbrish. Any suggestion to get the file downloaded as it is intended to be would be much appreciated.
@merchant27307 жыл бұрын
I see the file as it should be. Here I am posting the link: bulk.ginniemae.gov/protectedfiledownload.aspx?dlfile=data_bulk/mfppprpt.csv
@donbogdala54288 жыл бұрын
Great Tutorial Andrew!
@hoangmanhthang28737 жыл бұрын
Hi Andrew, Thanks for the tutorial. I saw at the end of the video is that we choose download to this folder manually. Is there any codes to automatically choose the "download to this folder" dialog box? or "cancel" thank you so much
@hoangmanhthang28737 жыл бұрын
+WiseOwlTutorials Hi, because of login method so I use internet explorer to download file and it show up save or open button. I just curious how to automatically click this. thanks
@hoangmanhthang28737 жыл бұрын
Ya! love so much your reply! I read on that topic but somehow I don't understand the deep root of it. It would be great if you could make a tutorial for this if you have spare times. It could save me a lot of times and get more deeper knowledge into how VBA works.
@hoangmanhthang28737 жыл бұрын
That would be great!!! SendKeys method seems to works while the IE is current window and visible right? For downloading a file, I think it should be IE.visible = False to get our automation target to download the file . And in my case, I put the sendkey below the downloading link, then run the code but nothing happen, may be I still stuck on something I don't know. Anyway thank you.
@mikkokoskinen33726 жыл бұрын
Hi Andrew, @21min 30 sec, I am able to run the code and I get the "File download started" message. However, the file does not appear in the destination folder. I'm not sure how to troubleshoot the issue or figure out why this the file does not appear.
@slicedbreadgames1315 жыл бұрын
If your destination is your expectation, perhaps the file to be downloaded restricts downloading from the Host. If Destination and Source are correct, w/proper extensions, I would say perhaps a Host issue...
@mohanreddyk19837 жыл бұрын
“Automation Error: Object Invoked has disconnected from its clients” I am trying to automate the Internet Explorer to scrape the data. But I am getting continuously the below error. So please share your thoughts / inputs to resolve this error. “Automation Error: Object Invoked has disconnected from its clients” Thanks a lot in advance!
@slicedbreadgames1315 жыл бұрын
I've always gotten this when the difference of using InternetExplorer or InterExplorerMedium ("medium integrity" per MSDN site). I have to use that one al the time while coding at work. But at home, no intranet to deal with. Try - 1. DIm IE as InterExplorerMedium 2. must always use 'navigate' method before setting 'visible' property 3. try to use late binding (dim IE, then Set IE separately, then after creating instance of IE, perhaps do Application.Wait for a few seconds) 4. frequently, throw in this to do 'nothing' while IE object is loading/busy Do Loop until IE.busy = False
@jjohnsonwichita4 жыл бұрын
Hi Andrew, I developed my own file download based on your code and it works great, except that it only finds 3 of the 8 hyperlink tags. I don't understand this. This is the web page FileURL = "kcnr.net/aboutus.php?p=new_bulletins". Any help would be appreciated.
@DM-py7pj4 жыл бұрын
Which hyperlinks are you after? What is an example missing link you expected to retrieve?
@vsiebert104 жыл бұрын
Hi Andrew - I am receiving an error when i try to run "compile error: User defined type not defined"... I have the urlmon on the computer but not sure how I am supposed to activate it ? or get rid of this error? I appreciate your help.
@DM-py7pj4 жыл бұрын
which line does error occur on?
@walthergroenewald93684 жыл бұрын
How about when a website has an element: ..... essentially that gives me a webpage that can be printed or saved as PDF. How can I automatically download this as PDF?
@DM-py7pj4 жыл бұрын
ie.document.querySelector(".fa-file-pdf-o").click though IE is not ideal for this as prompts for saveas/open which is a nuisance. Selenium is better as can specify default download folder.
@jrerickson1198 жыл бұрын
Would this also work with PDF documents that are linked in the webpage. I am looking to use this same concept with PDF's however, I am receiving the following error when trying to open the pdf: "Acrobat could not open 'test1.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded). fyi: I am about 47 mins into this video after downloading said files and attempting to open them. Any help would be greatly appreciated! Excellent video by the way, thank you!
@jrerickson1198 жыл бұрын
I have actually figured out the solution to my problem. Please, disregard my last comment! Thank you for this excellent tutorial!
@lsuk75232 жыл бұрын
Hi Sir, is this only works with internet explorer cause my company has disabled or removed the IE from there system...this API is not working.. Pls is there any other way to download file from chrome or edge as don't wanna use seleniam for this?
@WiseOwlTutorials2 жыл бұрын
Yes, the URLDownloadToFile function relies on Internet Explorer. Try this as an alternative stackoverflow.com/questions/17877389/how-do-i-download-a-file-using-vba-without-internet-explorer
@lsuk75232 жыл бұрын
@@WiseOwlTutorials thanku for the reply...i understood my work wrong. I need to dowload the file from SharePoint and that file is downloading but it's corrupted always. With URLtodownload method or http req?..pls give me any suggestion?
@miguelbandieramonte4 жыл бұрын
Hi Andrew, really great stuff!! I was able to make it works, but (there is always a "but" :-) ) I tried to use it in my job, and the report I need to download is behind a password protected webpage. Even if I give the URL the file download has the http code asking for a user and password. I tried then using the webbrowser control, that's give the user the chance to login and then hide userform to continue with the macros. It worked perfectly so I assume this function use the webbrowser open connection. Then, (here is the "but") I tried to use the IE object instead, BUT this function ignore the session the IE object opened and brought me again the file asking user and pass. Any clever way to use the IE session? Thanks in advance!!!
@hristonikodinovski15227 жыл бұрын
Can you pass in UserName and Password with this method?
@slicedbreadgames1315 жыл бұрын
If you're saying you have to login before you can download... you can perhaps login via XML or WinHttp, then attempt to run the Lib function. I'm unsure how access issues react to this download function. Maybe if you logon the one time, then however long the session is, and providing you don't have to pass around cookies, then might work...
@ricardogoncalves94537 жыл бұрын
Hi!! I followed all the steps until the minute 20:53. But when running it goes directly to the "File download not started", what could be, if I have seen the code several times and it is the same? Thank you
@slicedbreadgames1315 жыл бұрын
After sometime does it eventually finish? Perhaps a slow Host that takes longer to queue, and the VBA runs so quick it might pass that conditional IF statement before you get a good return from the server. Does the Source file change (does clicking it on a browser show that it generates a token of sorts to the end of the file name, thus having an invalid SourceURL every time?) I would try to use the "OnCodeInstallProblem" function to get the status of the download... Hope this helps.
@natiaparekhelashvili9133 жыл бұрын
Hello Andrew, thanks for this video. I have a list of google drive files in my excel sheet. How can i download these files into my local folder? Can i use the same methode you taught? What if it asks for username password? Thanks 😘❤
@WiseOwlTutorials3 жыл бұрын
Hello! Apparently the URLDownloadToFile technique works with files on Google Drive, at least if permission is granted to anyone with the link. If you need a username and password you might try the options shown in this thread stackoverflow.com/questions/17877389/how-do-i-download-a-file-using-vba-without-internet-explorer I hope it helps!
@sheikabdullah1795 жыл бұрын
Hi Andrew, I have part numbers list in excel I need to search and download the model,drawing and pdf for the respective part numbers from web portal. Can you please help me on this
@WiseOwlTutorials5 жыл бұрын
Hi there, I can try to help if you have a specific question. What have you done so far? Is there a specific part of your code that isn't working?
@sheikabdullah1795 жыл бұрын
WiseOwlTutorials I can’t able to write please help me on this
@WiseOwlTutorials5 жыл бұрын
Hi, I can try to help you with specific questions. If you have any please post them on the relevant video on KZbin or on our website.
@starlord55543 жыл бұрын
Wow , amazing video ( I have problem downloading web pages with scripts )
@ambrishraval55146 жыл бұрын
Hi, im a newbie in VBA and still learning as of now, may i request for your kind assistance. I want to automate web page filling , thru vba code I am abel to login in web site but not abel to click further - on Inspect element it shows as "" it not showing any name of button, pls help me.Thanks.
@slicedbreadgames1315 жыл бұрын
HTML can assign a link attribute to any type of tag. Luckily for this one, the element has an ID, which has to be unique, per Doc. So you can do - HTMLDoc.getElementByid("navBar0_menu1_dmmy1").click.
@chanu3127 жыл бұрын
I want to download a Excel file from website, I can able select the month on the Web page and then after clicking download i am getting Pop - up with options like save, save as and Open, how can I select the options save, save as or open
@Myrslokstok6 жыл бұрын
Chanakya S I think you can not controll that from excel in a good way.
@slicedbreadgames1315 жыл бұрын
If you're using HTML object library and using the .click method, you may see that Ctrl+J window (in IE). When you use the LIB function, there's no object, neither HTML nor IE, in which that popup could appear. In Andrew's video, you use the HTML object to get the elements needed, to get the download URL, then pass that into the download function with uses the LIB.
@Sameerkhan-cs8ln7 жыл бұрын
Hi Andrew, I've came across a scenario where instead of url there was javascript_postback enabled href. Is there is a way to automate file download from js enabled href.
@Sameerkhan-cs8ln7 жыл бұрын
Thank you Andrew, link worked well for me. Any chance of new tutorial on XMLHTTP request with regex to extract inner text.
@saimanohar1945 жыл бұрын
Hello Andrew and Sameer, could you please help me as well with the solution to this situation?
@guidoosterwald73434 жыл бұрын
Brilliant Job! Thank you!
@edwinmiranda40055 жыл бұрын
Very helpful video! I was able to create my own code to download .txt files from a site, but I also want to download the PDF version of these files. The PDF file opens up in a new window when I click a button on the site. I try to find the download link when inspecting the element on the button but I can't seem to find it and get this to work, or maybe I'm doing something wrong. Do you have an idea of how to accomplish this? any help will be greatly appreciated!
@WiseOwlTutorials5 жыл бұрын
Hi there, strange that you can't see the path of the pdf file that you're viewing, does it not show in the address bar of the new window that appears? If you can't find the URL of the pdf file to download perhaps you could just save the txt files you have downloaded as pdf files using Word for example? The basic code would look like this: Sub SaveTextAsPDFEarlyBinding() 'From the menu choose Tools | References... 'Select the Microsoft Word ##.# Object Library Dim wd As Word.Application Dim doc As Word.Document Set wd = New Word.Application wd.Visible = True Set doc = wd.Documents.Open(Filename:="C:\Wise Owl\My Text File.txt", Format:=wdOpenFormatUnicodeText) doc.SaveAs2 Filename:="C:\Wise Owl\My Text File", FileFormat:=wdFormatPDF doc.Close wd.Quit End Sub You could also do this using late-binding if you don't want to set a reference the Word library: Sub SaveTextAsPDFLateBinding() 'No reference to the Word library needed Dim wd As Object Dim doc As Object Set wd = CreateObject(Class:="Word.Application") wd.Visible = True Set doc = wd.Documents.Open(Filename:="C:\Wise Owl\My Text File.txt", Format:=5) doc.SaveAs2 Filename:="C:\Wise Owl\My Text File", FileFormat:=17 doc.Close wd.Quit End Sub I hope that gives you some idea of a way forward. By the way, your Mustang looks and sounds amazing! :D
@edwinmiranda40055 жыл бұрын
WiseOwlTutorials thanks for the reply, I’ll give this a try! And thanks for the compliments, I love Mustangs 😎
@WiseOwlTutorials5 жыл бұрын
So do I! But not all that common here in the UK. I had a 1980 Fox body with a 3.0l V6 from a Ford Granada for a short while. About 13 years ago I bought a wreck of a '71 Mach 1 351 with ambitions of restoring it. Lack of funds and time means it's still a wreck to this day! A guy down the road from me has a beautiful 2019 Bullitt (or at least it's got the Dark Highland Green paint job) which I drool over every time I walk past it! Let me know how you get on with the pdf files.
@edwinmiranda40055 жыл бұрын
WiseOwlTutorials oh wow! my dream car is the Mach 1! And yes I’ll keep you updated on the pdf download!
@edwinmiranda40055 жыл бұрын
WiseOwlTutorials after inspecting the element I see that there is no pdf link because the button has an “onclick” element and it pop ups the pdf in a new window. Copying the link address from the button gives me “void(null);” The href on the button shows me I tried using the link on the address bar from the new window after it pops up the pdf but that didn’t work.
@loveroflife21577 жыл бұрын
Thx for the tutorial. Very impressive.
@forzaalgiers20458 жыл бұрын
Thank you for the tutorial, the video and the file
@TonyDiaz.8 жыл бұрын
Awesome super awesome!!!! As always...
@hussainofficialyoutube5 жыл бұрын
Thank you very much for wonderful video. :) Could you please help me out to how to get the download link when we don't have file extension like .zip, .pdf,.jpg on download links in which we copy the download link short cut, cause some of the websites will generate using some php or javascript by click on download button and will generate random file name with it's extension. So that we can apply this URLDowloadtoFile procedure. Once again you are the best which i prefer first in youtube. Thank you :)
@milindkhot7682 жыл бұрын
Please suggest
@hadireg7 жыл бұрын
Awesome wiseowl!!
@ivanonanga21956 жыл бұрын
Hey @WiseOwlTutorials what's wrong??? it's been a while since the last video??? It's sad! We feel abondonned!