Posts

Showing posts from May, 2021

How to handle errors in VBA?

 1) Overflow error (Run-time error 6) This error occurs mainly because of 2 reasons: a) When we assign a large value to a small memory allocated variable. Like assigning a long value to an int variable. b) When we divide zero (0) by (0) Ex: a/b = 0/0. The a and b both holds 0. 2) Worksheetfunction.find method not found (Run-time error) Sometimes when we use "On error goto X" could also lead to an error. In that case, we may check the values whether they hold values greater than 0 or not using if-else logic, avoiding "On error goto X".

Steps to install and Use Selenium Basics for Web Scrapping Using VBA

 1) Download the Selenium Basic from below mentioned link: https://github.com/florentbr/SeleniumBasic/releases Download .exe file ( SeleniumBasic-2.0.9.0.exe ) 2) Download any web browser driver. In our case Google Chrome. Check for the latest version being used in your system. Click 3 vertical dots on the top right corner, goto Help --> About Google Chrome From there check the Google Chrome driver version and download the same version from the Web. A .rar file will be downloaded. Extract the files from it and copy the Chrome Driver from it and paste it into your system user's Local Folder. For Ex: "C:\Users\Dell\AppData\Local\SeleniumBasic".