Presentation is loading. Please wait.

Presentation is loading. Please wait.

Control Structures (part II)

Similar presentations


Presentation on theme: "Control Structures (part II)"— Presentation transcript:

1 Control Structures (part II)
Stefano Grazioli

2 Critical Thinking Many 0s – do not worry!
IF you got a zero you get to re-do: submit with today’s homework. We will regrade. EasyMeter 

3 VS - Optional own computer install
The following has a high success rate, but it is not a guaranteed solution. Make sure Visual Studio and all other Microsoft programs are closed Open Control Panel. Click “Programs and Features”. In the left sidebar, click “View Installed Updates” At the very top-right of the Uninstall an Update screen, type the following into the Search box: KB There may be one or more entries labeled Security Update for Microsoft Office 2016 (KB ). Select and click Uninstall. Uninstall them all. Now, reopen Visual Studio and you should be able to create a VSTO workbook. On the McIntire domain, we have blocked this update from all machines.  Home users won’t be so lucky; this update may come back again in the future.  Students can download the “Show or Hide Updates” tool from Microsoft to permanently block KB :

4 You Do The Talking Name Learning objectives
What you like about the class so far What can be improved Attitude towards the Tournament?

5 Loops for Repetitive Tasks
Control Structures Loops for Repetitive Tasks

6 Loops – For … Next For i As Integer = 1 To 10 Step 1 next
Application.ActiveCell.Offset(i, 0).Value = i * 100 next

7 Loops – For Each For Each myCell As Excel.Range in Application.Range("A1:B4") myCell.Value = myCell.Value * 2 Next

8 Loops – Do Loop 1 Do ‘ body of the loop Loop While <test>

9 Loops – Do Loop 2 Do While <test> ‘ body of the loop Loop

10 What Is New In Technology?
WINIT What Is New In Technology?

11 Object-Oriented (OO) VB and VBA are OO languages
Almost everything is an object Object = methods() + properties Properties can store other objects Class is a description (code) for an object Instance is a specific working object in your computer

12 Dot notation The dot allows us to “look inside” programming items (e.g., a class). Go from “known” to “specific”. myTempRange.Borders.Color = Drawing.Color.LightGray myTempRange.Interior.Color = Drawing.Color.DarkBlue

13 H4

14 Suggestions Submit carefully
me. Come and see me. Office hours on web site.


Download ppt "Control Structures (part II)"

Similar presentations


Ads by Google