61 |
62 |
63 |
--------------------------------------------------------------------------------
/Section 4/L4.2.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalgirdher/webScrapingUsingVBA/9a9a64ac5dd0c819205a8d8df9d9a8d62cbbb050/Section 4/L4.2.xlsm
--------------------------------------------------------------------------------
/Section 4/L4.6.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalgirdher/webScrapingUsingVBA/9a9a64ac5dd0c819205a8d8df9d9a8d62cbbb050/Section 4/L4.6.xlsm
--------------------------------------------------------------------------------
/Section 4/L4.7.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalgirdher/webScrapingUsingVBA/9a9a64ac5dd0c819205a8d8df9d9a8d62cbbb050/Section 4/L4.7.xlsm
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | ### Web Scraping using Microsoft Excel VBA [Complete Course on Udemy]
2 |
3 | #### Author : Kamal Girdher
4 | #### Youtube : https://www.youtube.com/c/xtremeExcel
5 | #### Telegram : https://t.me/letsautomate
6 |
7 | --------------------------------------------------------------------------
8 |
9 | ## Index
10 |
11 | to be updated
12 |
13 | --------------------------------------------------------------------------
14 | ## 1. Introduction & Disclaimer
15 |
16 | ### 1.1 What is Screen Scraping / Data Scraping?
17 |
18 | Screen scraping is a practice of collecting all visual data from a website for use elsewhere. We typically automate the process by writing a script or using a software.
19 |
20 | ### 1.2 Is Scraping Legal?
21 |
22 | It is not, unless you are scraping your own website or blog. We therefore do not promote Data Scraping in any way. Before you continue with this course, you accept that you won't misuse the content for any unauthorized or illegal activity.
23 |
24 | --------------------------------------------------------------------------
25 |
26 | ## 2. VBA Refresher [Optional]
27 |
28 | > **NOTE :** If you are not comfortable in VBA, refer [Excel macros/VBA Course on Youtube.](https://www.youtube.com/watch?v=dYHgr2murPk&list=PL1R_HJw0CDYKjmUxI3IKyuJcIKnWHVcuj)
29 |
30 | ### 2.1 Subprocedures & Functions
31 |
32 | A **subprocedure** is a series of VB statements enclosed by the Sub and End Sub. It performs a task and then returns control to the calling code, but it does not return a value to the calling code.
33 |
34 | ```vba
35 | Sub nameOfSubprocedure()
36 |
37 | End Sub
38 | ```
39 |
40 | A **function** on other hand is a series of VB statements enclosed by the Function and End Function. It performs a task and then returns control to the calling code. When it returns control, it also returns a value to the calling code.
41 |
42 | ```vba
43 | Function nameOfFunction()
44 |
45 | nameOfFunction =
46 | End Function
47 | ```
48 |
49 | > To learn more about functions and subprocedures, refer this [tutorial about Functions & Subprocedures](https://www.youtube.com/watch?v=1KDdu4BOZSA&list=PL1R_HJw0CDYKjmUxI3IKyuJcIKnWHVcuj&index=7&t=0s)
50 |
51 |
52 | ### 2.2 Variable Declaration and Object Initialization
53 |
54 | **Variables** can store information required to use in our program. These are used to store values of various data types.
55 |
56 | #### Declare a variable
57 | ```vba
58 | Dim a As Integer
59 |
60 | Dim b As String
61 |
62 | Dim c As Variant
63 | ```
64 |
65 | #### Initialize a variable
66 | ```vba
67 | a = 10
68 |
69 | b = "Kamal"
70 | ```
71 |
72 | To understand variables in detail, refer these tutorials:
73 |
74 | a. [Option Explicit & Implicit](https://www.youtube.com/watch?v=mojNkrnt_YA&list=PL1R_HJw0CDYKjmUxI3IKyuJcIKnWHVcuj&index=5&t=0s)
75 |
76 | b. [Dim, Public, Private and Global Keywords](https://www.youtube.com/watch?v=33JmyY83IpA&list=PL1R_HJw0CDYKjmUxI3IKyuJcIKnWHVcuj&index=6&t=5s)
77 |
78 |
79 | #### Declare an Object
80 | ```vba
81 | Dim o as Object
82 |
83 | Dim e As Excel.Application
84 |
85 | Dim o As Outlook.Application
86 | ```
87 |
88 | #### Initialize an Object
89 | ```vba
90 | Set e = new Excel.Application
91 |
92 | Set o = new Outlook.Application
93 | ```
94 | --------------------------------------------------------------------------
--------------------------------------------------------------------------------