Programming with Excel VBA

Automate Calculations in Excel

Programming Basics & Databases4.9(94)3h 54m14 lectures2 sections

What you'll learn

  • Write your first program in VBA
  • Understand events, controls, and their properties in VBA
  • Work with Excel objects and conditional statements
  • Use variables and program the message box
  • Add controls to worksheets
  • Work with Excel cells through code
  • Understand algorithms and plan your code
  • Use loops and macros

About this course

This course teaches programming with Excel VBA: writing Visual Basic for Applications code to automate calculations and repeated tasks inside Excel with one click. You start with the introduction and course outline, then break the ice and write your first program, learn events and controls in VBA, and get to know controls and their properties. Next you learn Excel objects and conditional statements, variables and message box programming, adding controls to worksheets, and how VBA works with Excel cells. Then you move to the idea of algorithms and building a plan for writing code, loops, a program that picks the best supplier, and macros, with the work file and exercises to download. It suits Excel users, accountants, reporting staff, and anyone who wants to save time on repeated tasks. It helps to know Excel basics, but you need no programming experience, because the course starts with your first program. By the end, you will be able to write a macro and simple programs, control cells and controls, and make your calculations run automatically.

Expected outcomes

  • Automate processes within Excel using VBA.
  • Create custom software solutions to meet business needs.
  • Enhance productivity by writing code and executing algorithms.
  • Develop programming skills to solve problems and increase efficiency.

Learner reviews

These reviews are from learners who bought the content and completed at least 50% of it — there are no reviews from anyone who hasn't gone through the material.
4.9
★★★★★
94 reviews
5★
82
4★
11
3★
1
2★
0
1★
0
  • ★★★★★أحمد ا.·منذ 2 شهرشاهد 100٪

    دورة تدريبية جيدة جدا

  • ★★★★★Ahmed s.·منذ 3 شهرشاهد 100٪

    ممتاز وسهل جدا

  • ★★★★★كوثر ا.·منذ 4 شهرشاهد 100٪

    أستفدت كثيرا من الدورة, وايضا التطبيقات كانت فعالة في تثبيت المفاهيم, شكرا لمجهوداتكم

تم عرض كل التقييمات (3)

Course content

1

Programming with Excel VBA

12 lectures
  1. Introduction and Course OverviewIntroduces the Excel VBA course and its inverted-pyramid, example-driven approach, covering the VBA environment, objects and events, user forms, variables, conditions and loops, message boxes, and macros.3:14
  2. Icebreaker and Writing the First ProgramDefines VBA as a programming language embedded in Microsoft Office, shows enabling the Developer tab and opening the Visual Basic environment, the Excel file structure (workbook, sheets, cells), and writes a first program that shows a message.18:38
  3. Events and Tools in VBAExplains the concept of events in VBA and their types such as application and sheet events, and introduces the UserForm and its controls like Label, TextBox and command button, and the difference between Check and Option.15:55
  4. Understanding Tools and Their PropertiesBuilds a user form for entering a password, explaining control properties such as the programmatic name and PasswordChar that masks text with stars, and where code goes: the Workbook open event and the command button.20:35
  5. Excel Objects and Conditional StatementsPrograms the password form: the Workbook open event to hide Excel and show the form, If, ElseIf and Else conditionals to check the password, and Trust Center macro settings.24:25
  6. Variables and Message Box ProgrammingAdds an exit button to the password form, programs a MsgBox with Yes and No buttons, explains declaring variables with Dim and its value for clean code, and using a condition to decide on exit.17:44
  7. Adding Tools to Excel WorksheetsAdds controls directly to an Excel worksheet instead of a user form, through an example solving a first-degree equation: a command button, reading A and B from cells, declaring variables As Double, and showing X.20:51
  8. How VBA Handles Excel CellsImproves the equation-solving program to handle special cases: checking A is not zero and cells are not empty, using nested If statements and compound conditions, with clear error messages and indentation for readability.19:29
  9. Understanding Algorithms and Building a Code Writing PlanExplains the concept of an algorithm and how to plan code before writing it, using a quadratic equation solver in VBA: choosing the needed variables, checking the value of A, and handling the cases of delta.27:32
  10. Understanding the Concept of Iterative LoopsIntroduces loops in VBA and the general form of For, While and Until loops, showing how the For counter works, along with improving the alert messages in the equation program.23:25
  11. Best Supplier Identification ProgramApplies loops in VBA to a real program that finds the best supplier from a table of weighted scores, using a For loop that compares values with a Max variable and shows the best company in a MessageBox.22:57
  12. Macro UnitsExplains Excel macros and macro recording, including formatting cells with code and RGB colors, assigning a shortcut, choosing where to store the macro, and editing the generated code to reuse it.19:38
2

Attachments

2 attachments
  1. Uploading the Work File
  2. Downloading Applications

Instructor

Dr. Eng. Mohamed Al-Khodour

Dr. Eng. Mohamed Al-Khodour

PhD in Communication Engineering with several published research papers in peer-reviewed journals. Lecturer and trainer in computer science.
15.5K views5 courses

Related courses