ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

The Easiest Way to Scrape Web Data with VBA

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 มี.ค. 2022
  • Learn how to write real-world Excel VBA code: 👉courses.excelm...
    Want to download the source code for this video? Go here: bit.ly/3NrfGt4
    Subscribe to the channel here: bit.ly/36hpTCY
    The Easiest Way to Scrape Web Data with VBA
    In this video I show you how to scrape data using a little-known method. The method is powerful because it only requires a few lines of code and doesn't require any installation or browser.
    Free Excel VBA Resources
    Excel VBA Articles (excelmacromast...)
    Useful VBA Shortcut Keys
    ========================
    Debugging:
    Compile the code: Alt + D + L OR Alt + D + Enter
    Run the code from the current sub: F5
    Step into the code line by line: F8
    Add a breakpoint to pause the code: F9(or click left margin)
    Windows:
    View the Immediate Window: Ctrl + G
    View the Watch Window: Alt + V + H
    View the Properties Window: F4
    Switch between Excel and the VBA Editor: Alt + F11
    View the Project Explorer Window: Ctrl + R
    Writing Code:
    Search keyword under cursor: Ctrl + F3
    Search the word last searched for: F3
    Auto complete word: Ctrl + Space
    Get the definition of the item under the cursor: Shift + F2
    Go to the last cursor position: Ctrl + Shift + F2
    Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
    To move lines of code to the right(Indent): Tab
    To move lines of code to the left(Outdent): Shift + Tab
    Delete a Line: Ctrl + Y(note: this clears the clipboard)

ความคิดเห็น • 166

  • @Excelmacromastery
    @Excelmacromastery  2 ปีที่แล้ว +23

    Learn how to write real-world Excel VBA code: 👉courses.excelmacromastery.com/
    Want to download the source code for this video? Go here: bit.ly/3NrfGt4

    • @viveksharma4193
      @viveksharma4193 2 ปีที่แล้ว

      how to fetch data from sql

    • @lesliebenjamin5487
      @lesliebenjamin5487 2 ปีที่แล้ว

      How can you handle say PAGINATED web data? same using VBA?

    • @sammybenmenahem
      @sammybenmenahem ปีที่แล้ว

      But what if the page is not table elements, only divs and labels?

    • @vikrantchouhan9908
      @vikrantchouhan9908 4 หลายเดือนก่อน

      Hello sir, can one also load data on the html pages using the field ID (without relying on the sendkeys method). Any inputs will be valuable.

  • @bredmond812
    @bredmond812 2 ปีที่แล้ว +16

    No kidding. I've been watching videos on VBA web scraping since yesterday and was going through TH-cam literally right now looking for more getting ready for a project. Then you post this new video in the middle of that. Thank you!

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว

      That's Great Brandon.

    • @bredmond812
      @bredmond812 2 ปีที่แล้ว

      @@Excelmacromastery Say, while I got your attention, do you know if it is feasable to capture a whole website and all its assets to make a copy of it?

  • @AlejandroSerranoJuan
    @AlejandroSerranoJuan 2 ปีที่แล้ว +2

    Really. You are the best VBA code professor I know. As you keep sharing we keep improving. Thanks for it.

  • @compscript7973
    @compscript7973 2 ปีที่แล้ว +2

    This was great.
    I have been watching videos all day and this is the first one that worked.
    I look forward to watching this same video using other methods besides tables.

  • @CAP0NE
    @CAP0NE 10 หลายเดือนก่อน

    Very good video and annotations. In about only 7 minutes I've learned more then in an hour of searching and reading.
    Many thanks for that!

  • @redfeather22sa
    @redfeather22sa ปีที่แล้ว +1

    Brilliant Paul !!! Thanks !! I've been using the same for years but glad there's an accessible reference to it on TH-cam now !!

  • @serdip
    @serdip 2 ปีที่แล้ว +2

    Another AMAZING video! Thanks very much for showing how easy it can be to scrape data from web pages. The solution presented is simple and elegant and easily adapted to a wide variety of use cases. Thank you!!

  • @jenniferbabitzke9474
    @jenniferbabitzke9474 ปีที่แล้ว

    This video and code is going to save me countless hours on a research project. Thank you so much!!!

  • @cristiano440
    @cristiano440 ปีที่แล้ว

    The most useful thing I've seen this year... man... you rock!

  • @postventatewis9968
    @postventatewis9968 2 ปีที่แล้ว +6

    Great, Paul. Thanks for this. I want to ask you two questions. How send user & password to a site, and how populate the search box with a input box or a cell content.Regards

    • @pedrohcp
      @pedrohcp 2 ปีที่แล้ว +1

      Wanna know as well

  • @stevennevin7466
    @stevennevin7466 2 ปีที่แล้ว +1

    Excellent explanation. You have made this task much less daunting. 👏.

  • @Code_Play_com
    @Code_Play_com 5 หลายเดือนก่อน

    Very practical and helpful video with very detailed explanation!

  • @free3690
    @free3690 2 ปีที่แล้ว +3

    Very helpful examples, thank you for the video!

  • @alexandrumoldovan9936
    @alexandrumoldovan9936 2 ปีที่แล้ว +1

    Great video with lots of insights, which is really the norm for Paul at this point.
    Query tables look really powerful, maybe you could make a video more in detail about it in the future. I'm sure many, myself included, would find that very helpful.
    Thank you!

  • @user-ue9rh3xi3n
    @user-ue9rh3xi3n ปีที่แล้ว

    Thanks Paul. This video is very helpful. You should be canonized for your body of work.

  • @danielmelo389
    @danielmelo389 2 ปีที่แล้ว

    Best Excel channel on youtube

  • @HectorAgostoOne
    @HectorAgostoOne 2 ปีที่แล้ว

    Ahhh. This is excellent but I got so hooked to Power Automate for web scraping as it makes it sooo easy. Still, this tutorial is A+. Going to attempt this to have further hands on knowledge on vba

  • @dmp4096
    @dmp4096 2 ปีที่แล้ว

    THIS!!! IS!!! AWESOME!!! I was looking for a way to let a workbook pull down data from a MySQL database on the web easily. I think with the right bit of code on my server I can make this happen with these tools.
    THANK YOU SO MUCH!

    • @jvdb5509
      @jvdb5509 2 ปีที่แล้ว +1

      Have you tried using PowerQuery?

    • @dmp4096
      @dmp4096 2 ปีที่แล้ว

      @@jvdb5509 no. I really am no Excel wizard. I’m an old school programmer trying to automate some stuff for a good friend and our ski race league. I’ve developed a bit of familiarity with VBA and this idea seems to get me around some other areas I have no familiarity with… LOL ….as well as not requiring total control over the server…

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว +1

      You're welcome

  • @johnwayne8059
    @johnwayne8059 2 ปีที่แล้ว +1

    Amazing video Paul!🥳🍀😁🤟😎

  • @CanalInvestidor
    @CanalInvestidor 2 ปีที่แล้ว

    Excellent tutorial, makes it possible to explore many fronts.

  • @jim2lane
    @jim2lane 2 ปีที่แล้ว +1

    For those who are fairly new to coding, what you see there in the VBA coding window is the development environment that all Microsoft centric coders worked in twenty years ago 😊

    • @FilipCordas
      @FilipCordas 2 ปีที่แล้ว

      Don't be ridiculous Visual Studio has been introduced in 2000 and it was by far the best ide in the world.

    • @jim2lane
      @jim2lane 2 ปีที่แล้ว +1

      @@FilipCordas actually, the first version of VS came out in '97. I used that version extensively back then, and each iteration since then. But the IDE experience back then was very similar to this - hence my comment

    • @stevenabel2068
      @stevenabel2068 ปีที่แล้ว +1

      @@jim2lane I still have a copy of Visual Basic 1.0 - those were the days. Bleeding edge programming and boy were we bleeding at times

  • @deexcelguy
    @deexcelguy 2 ปีที่แล้ว

    Mind-blowing... Best Web scrapping with VBA video ❤❤❤

  • @alanlamb6047
    @alanlamb6047 2 ปีที่แล้ว +2

    Great video, well presented as always.
    As a long time excel user , I suspected this code was effectively the same as using the legacy data wizards
    (Data: GetData: Legacy Wizards: From Web. Note you may need to enable wizards: Excel Options: Data: Show legacy data import wizards: From Web)
    In some instances, I have found the legacy data connections are a lot faster than the modern PowerQuery methods
    Anyway, if you turn on the VBA recorder and then use the above wizard, you will get the same core VBA code generated as per the video
    However, in my quick performance check, the PQ method was substantially faster for this case

  • @user-vg1zf8dn5m
    @user-vg1zf8dn5m 3 หลายเดือนก่อน

    Hello, thank you for the video. I need help, please
    What should we do?
    If the site requires you to log in first, then scrape the data from it after that

  • @vbaclasses3553
    @vbaclasses3553 2 ปีที่แล้ว +1

    Great video, thanks for sharing. Another tool in the toolkit.

  • @turkaykoc8587
    @turkaykoc8587 ปีที่แล้ว

    Thank you very much for sharing valuable information.

  • @joaocustodio2094
    @joaocustodio2094 2 ปีที่แล้ว

    As always... well done Paul. Thanks very much.

  • @MichaelWilliams-rf2jw
    @MichaelWilliams-rf2jw ปีที่แล้ว

    I love this video! Thanks for sharing this info.

  • @Jocedu06
    @Jocedu06 2 ปีที่แล้ว

    Awsome! This is the object used by powerquery when loaded in a table

  • @likhangsubok
    @likhangsubok 2 ปีที่แล้ว

    thank you so much for this tutorial, so helpful and very informative. watching from abu dhabi uae

  • @bxyhxyh
    @bxyhxyh 2 ปีที่แล้ว +1

    Hello, can you make a video to get unique values fastest way?
    - Dictionary way
    - Collection way
    - Unique function from 365 and 2021
    and other methods that i don't know etc...

  • @hassanrozh6579
    @hassanrozh6579 2 ปีที่แล้ว

    Great job, thanks for sharing this helpful way.

  • @orhanozturk1183
    @orhanozturk1183 2 ปีที่แล้ว +2

    Hi, if web site is protecting like How to add username and password entering code?

  • @youknowme6780
    @youknowme6780 ปีที่แล้ว +1

    I am working on a vba to fill web form, it works on first IE page and submit the form, but when a new page loads with different web address, my code don't recognize the active web page... Any advice??? No selenium used

  • @wayneedmondson1065
    @wayneedmondson1065 2 ปีที่แล้ว

    Great one! Thanks Paul.

  • @vikrantchouhan9908
    @vikrantchouhan9908 2 ปีที่แล้ว +1

    Great one! Would it be possible to populate the data as well (on web pages) using this approach?

  • @CollDott
    @CollDott 2 ปีที่แล้ว +1

    👍 Amazing!!

  • @mannymtzgomez
    @mannymtzgomez ปีที่แล้ว +1

    I can’t seem to get the code files, could you please post them again?

  • @s1ngularityxd64
    @s1ngularityxd64 2 ปีที่แล้ว

    This is so fast, amazing. How would you fetch urls from a table instead of a hard coded url?

  • @apbosh1
    @apbosh1 2 ปีที่แล้ว

    You're showing the chrome examples saying don't have to use all this code, I'm thinking that looks neat as, already. Superb information as usual. Do you have a video on reading larger csv files 250k rows but managing memory and cleaning up afterwards. I will look as well .

  • @KhalilYasser
    @KhalilYasser 2 ปีที่แล้ว

    Awesome tutorial. Thanks a lot.

  • @geoffj3191
    @geoffj3191 ปีที่แล้ว +1

    This is great, but how do you login and submit your username and password before you access the data. I can enter my username and password, but can't figure out how to click on the button as it doesn't seem to be clearly identifiable in the HTML.

  • @online7198
    @online7198 5 หลายเดือนก่อน

    Hello, I am Omar from Egypt. I am interested in your videos. I would like to ask a question. Can I access a data source for a website.
    When I search about some on website

  • @TheMisiekMisiek
    @TheMisiekMisiek ปีที่แล้ว

    Perfect. Very useful.

  • @micheltw
    @micheltw 2 ปีที่แล้ว

    Best web scraping video

  • @vivandh1404
    @vivandh1404 11 หลายเดือนก่อน

    sir how can we achieve IMPRTXML FUNCTIONALITY of google sheet into MS excel ?

  • @gzfraud
    @gzfraud ปีที่แล้ว

    QUESTION .... I scrape 10,00+ webpages so this will really help. BUT if a URL is embedded in text on a webpage, PQ or BI won't extract the URL eg email address is embedded in the person's name. I've searched and can't find it. Any ideas?

  • @samektahadi
    @samektahadi ปีที่แล้ว

    "needs to review the security of your connection before proceeding"
    hi, I got this message when running the vba code you're providing

  • @TP-om8of
    @TP-om8of 2 ปีที่แล้ว +2

    It’s definitely better than the old IE method. But seriously, use Python not VBA for webscraping

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว +4

      Maybe for extensive web scraping. But if you just need to get data from a page or table then installing and learning Python is a big overhead for most people.

  • @user-nz1of4kh6u
    @user-nz1of4kh6u ปีที่แล้ว

    Hello, good evening, wow, excellent tutorial. I have tried the macros and they work wonderfully, but something strange happens to me and I have not been able to find what is happening.... I perform a scraping to a web whose unique table has more or less 15000 objects but it only reflects me in the sheet only 100 .... What could be happening? I hope you help me understand thank you very much...

  • @meiyi6520
    @meiyi6520 ปีที่แล้ว

    Great video! How do I write the code if I need to scrap the table from mulitple web pages?

  • @js-cx8wk
    @js-cx8wk 2 ปีที่แล้ว

    Thank you, nice video!!

  • @miless2111sutube
    @miless2111sutube 2 ปีที่แล้ว +1

    as always presented in a clear, easy and reassuring way :) How do you know which table reference (table 1) to use? Is it simply counting them visually or is there somewhere on the web page that you have to go to see that the table is referenced as table 1?

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว +2

      No clear cut way. You can count them on the page but it's not always obvious what is a table. You can check the underlying html code. The easiest thing is to run the code until you hit the correct one although this may not always be feasible.

  • @derekharmon6999
    @derekharmon6999 2 ปีที่แล้ว

    Great video! Would I be able to pull out all terms on a webpage that were bolded and list them on a column with this same code?

  • @normalguystrive
    @normalguystrive ปีที่แล้ว

    Anyone know if this can be used on a webpage with a username and password? IE, not public, but it's my account that I log into.

  • @ELS737
    @ELS737 2 ปีที่แล้ว

    Tnak you for the Video, awesome! When I go to download stock quotes I only get updated data about once a minute, the sites seem to somehow prevent a second by second update. How would this still be possible?

  • @garyburke9990
    @garyburke9990 ปีที่แล้ว

    Would be great if you could do a video on scraping an e-commerce site

  • @pbs36
    @pbs36 2 ปีที่แล้ว

    Great video.

  • @golfmedic100
    @golfmedic100 2 ปีที่แล้ว

    great video - just wondering if this method be used to scrape a table ?

  • @KhanhNguyen-bn4jx
    @KhanhNguyen-bn4jx 2 ปีที่แล้ว

    thank you very helpful video.

  • @jennilong7798
    @jennilong7798 2 ปีที่แล้ว

    Is there a way to use the whole page code, but using a large list of URLs and placing their data into new sheets? 1 URL = 1 new sheet.
    I need to do this for a large amount of URLs and can't figure out how to do it in batches/more than one at a time.

  • @AvagyanAvag
    @AvagyanAvag 2 ปีที่แล้ว

    Nice coding example, although for this job Power Query suits better

  • @fortak2006
    @fortak2006 ปีที่แล้ว

    this video is amazing, I used to use httprequest, how about if the website required login name and pw, is it possible use "query table"? thank you

  • @suqabi
    @suqabi ปีที่แล้ว

    It give me error massage : unable to open "url". Cannot download the information requested.

  • @CoolAmyKid
    @CoolAmyKid ปีที่แล้ว

    how would I edit this code to just get one element from the webpage? preferably by ID
    thank you

  • @todddean7722
    @todddean7722 2 ปีที่แล้ว

    Can this method be used to navigate to other pages using links and to enter information needed, like login and passwords? If so, have you done a video on it? If so, may I get a link to the video? Thank you.

  • @softwareinfacont4438
    @softwareinfacont4438 ปีที่แล้ว

    Hi. Excelent
    is it posible insert into MS ACCESS Table ?

  • @juniorortizaraujo6139
    @juniorortizaraujo6139 9 หลายเดือนก่อน

    Can we download excel report from a website ??

  • @Victor-ol1lo
    @Victor-ol1lo 2 ปีที่แล้ว

    Awsome !! Thanks for sharing !!!

  • @MarkP_Fan
    @MarkP_Fan 7 หลายเดือนก่อน

    Nice video but seems to be totally useless when table data is displayed from a PHP query or script which in my experience is where most website data tables comes from.

  • @mmbcampus
    @mmbcampus ปีที่แล้ว

    hello, How can i interact or populate a webpage form through VBA MSXML without opening IE or without IE method. pls kindly help?

  • @wojciechgebura3678
    @wojciechgebura3678 ปีที่แล้ว

    You're doing great job, Paul, thank you! One question: is it possible to scrape Web Data with VBA the exact way as follows?
    I define about hundred URLs and also three to five keywords/phrases to find on those websites. VBA does the search job and when found, it returns the results in a spreadsheet as links to the articles that content those keywords/phrases. The process would be repeated once a week. Is it doable with the VBA?

  • @huonggiang537
    @huonggiang537 2 ปีที่แล้ว

    In case login requires captcha code, it is very difficult to pass this code, is there a way to scrape data from the website that is already logged in? Thank you very much

  • @Mexico0607
    @Mexico0607 ปีที่แล้ว

    FIrst of all a very nice and useful tutorial. I have a practical question: I use the querytable approach. Unfortunately the webpage Table uses another number format then my Excel (. and , swapped for dezimals). Is it possible to change this in the querytable?

  • @Irfan9191111
    @Irfan9191111 2 ปีที่แล้ว

    There is a QUERY function in google sheets. Any such option in Excel (including VBA)?

  • @Adam_K_W
    @Adam_K_W 2 ปีที่แล้ว

    Could this method be used to grab a JWT (*Jason Web Token) from an Azure Database for use in running a Single Sign On process?

  • @raviprakashh
    @raviprakashh ปีที่แล้ว

    Can you please suggest how to send data to web page and click on button.

  • @hjiraoussama776
    @hjiraoussama776 2 ปีที่แล้ว

    Is there a way to scrape data from multiple salary pdf payslips into excel table ?

  • @Space.of.C
    @Space.of.C ปีที่แล้ว

    If there are multiple tables on the website then how can I extract let say 1-5 tables ??

  • @davej429
    @davej429 2 ปีที่แล้ว

    Promising but after putting this in and running, it is just so very slow to pole the site and write the data. Not sure anything can be done to speed up. I'm using Windows 10 and Office 365.

  • @vv9730
    @vv9730 2 ปีที่แล้ว

    I'm new to VBA & thought the task look easy but still not find the way despite google.
    I want to achieve following through VBA code :
    i've following prepared:
    Column A- list of Urls
    Column B - download folder ( location on computer)
    Column C- status of downloaded file ,i.e. Ok,error,etc(required after completing following process)
    1.open the url from a list of urls ;
    2.find a specific button-"Excel" on the webpage opened in step 1;
    3.Click that button, a new window will pop up, asking the location to save the data in excel format;
    4.press save button to save the file;
    5.Open next url as per step 1 & repeat above process till all the files from specified urls are saved in specified folder.
    can u help on above..??

  • @jacobnye4490
    @jacobnye4490 ปีที่แล้ว

    Does this work for dynamic web pages?

  • @torbjornsvensson2527
    @torbjornsvensson2527 2 ปีที่แล้ว

    Nice Video! But I get the response that I have to Enable javascript from the webpage I try to scrape? Is there any solution for this?

  • @knowledge2excel83
    @knowledge2excel83 2 ปีที่แล้ว

    Excellent

  • @bigdatax6512
    @bigdatax6512 ปีที่แล้ว

    is working for 100 pages??or just one page???

  • @rogerramos6745
    @rogerramos6745 2 ปีที่แล้ว

    I am trying to download the Query Table source code but I get stuck on an infinite loading screen. Is there a better way to get around this? As it stands right now the code generates an error saying "Incomplete Database"

  • @rafatshaikh3599
    @rafatshaikh3599 2 ปีที่แล้ว

    Hi, I want to scrap Indimart Data. There are no options for exporting the data. I want the leads available for the specific category. I have the API as well. Please can you guide me on this

  • @wikanwiratmoko4446
    @wikanwiratmoko4446 9 หลายเดือนก่อน

    helo sir, how scrape data from registeried page ?

  • @vashisht1
    @vashisht1 2 ปีที่แล้ว

    I still use vba to send bulk email at once with all attachment in every mail....my team mates are non technical...they are always shocked how I do work so fast...my bosses are mad at me for using automation since they want me to be donkey...doing manual work.....but I am a smart datamonkey ...

  • @klent3284
    @klent3284 2 ปีที่แล้ว

    The link for the source code doesn't seem to work. Getting this error: "This site can’t be reached"

  • @Szajbus37
    @Szajbus37 2 ปีที่แล้ว

    Hi i just have a quastion about some help in my excel to automate a few steps, it's any chance to contant you ? Like discord or something else

  • @salvatoreimperatore9553
    @salvatoreimperatore9553 ปีที่แล้ว

    Hello, compliments, I would like to ask you if you think it is possible to create a vba for Google search. I would need to enter a barcode on the Excel sheet and through the search of the code it should return me product name, brand, description, and image link. Is something like this possible? It would be great if you could make a video for it. I think it would be interesting for all traders like me who have a physical store and an online site and each time uploading products to the site is boring because it involves thousands of product sheets, so if we could manage to search through the barcode product on the web and returns: product name, description, brand, and 3-4 product image links in an excel sheet to then upload the sheet to the site. Would be the best. Let me know if this idea of ​​mine is possible or impossible, thank you

  • @Cappurnikus
    @Cappurnikus 2 ปีที่แล้ว

    Rather than delete and replace the equal sign, you can also press Ctrl+space to see intellisense.

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว

      lol! True - I use this so automatically that I actually forgot about it.

    • @Cappurnikus
      @Cappurnikus 2 ปีที่แล้ว

      @@Excelmacromastery The only reason I remember is that I spent a couple months using Python and had to consciously remember not to use Tab.

  • @charan888
    @charan888 2 ปีที่แล้ว +1

    What if there is an authentication to the website we are trying to access. How to handle that using query tables ?

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว +1

      You would need to use one of the other libraries such as Selenium or Http XML.

  • @mustafakurt3546
    @mustafakurt3546 2 ปีที่แล้ว

    perfect bro

  • @cristhiancabra184
    @cristhiancabra184 2 ปีที่แล้ว

    Hello, excellent video, but i have a question, what if we need to get data from a webpage that isn't in a table and we need to find the html location? Can you make a video explaining that webscraping method please? how to extract specific data from a webpage

    • @mirekt1822
      @mirekt1822 2 ปีที่แล้ว

      Look at 5:42 there is some info but it needs some learning ;-)

  • @ignacioa3698
    @ignacioa3698 2 ปีที่แล้ว

    You able to do webscrape, however, scraping data from the page filters that I normally have to MANUALLY populate the search criteria? For example, I have to get just simple total numbers of times a particular person’s username processed certain items for the day.
    I have to do this for about 10 different users from my team at work. And I have to pull the data by manually populating that person’s username in the specific search filter field criteria then the page clocks and spits out the data table, then I manually highlight the data on the page in order to get a simple total number of times that come up for that specific username for the day. And I have to type and change the username on a specific filter search space every time for all of my work group members that I’m collecting the data.
    Also, depending on how long it takes the page to get the data, I know there’s a VBA feature that prevents the VBA from “timing out” in case the data at times takes longer depending on the size the data table.

  • @MGDLProductions
    @MGDLProductions 2 ปีที่แล้ว +1

    There is actually one more way of scraping a web (and other applications also) in VBA.
    The UI Automation Client. Very powerful, very complex and hard to learn, but wow when you get it...
    Then you can do almost anything.

    • @Excelmacromastery
      @Excelmacromastery  2 ปีที่แล้ว

      Sounds great Mikael. Thanks for mentioning it. I'll definitely take a look.

  • @Donly1pt
    @Donly1pt 2 ปีที่แล้ว

    Excellent work. One question, is there a way to make the code wait for the query to complete before proceeding? Using that "Main" sub you used on the video as an example, if I have code after the UseQueryTable to do something with the values that I expect from the table it will try to do so before the table is there because the query takes a while. I tried using a Sleep function after the UseQueryTable call but it seems to also halt the progress of query....

    • @pjetrucha
      @pjetrucha 2 ปีที่แล้ว

      Had the same issue with macro which refreshed tables in Excel (connected to Oracle database through PowerQuery) and later used those tables in some calculations. I've tried Sleep, Wait but it didn't fit my needs. Finally I've stumbled upon DoEvents and it worked like a charm ;)

    • @Donly1pt
      @Donly1pt 2 ปีที่แล้ว

      @@pjetrucha how could I use doevents in this case to allow the query to complete?

  • @phanhuyhoang3720
    @phanhuyhoang3720 2 ปีที่แล้ว

    I’m stuck with f2a even I knew all credentials. Any Idea sir