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 Homework folders are timed
Keyword list / dictionary linked from the schedule EasyMeter 

3 Visual Studio is a tool to build all sorts of apps: web, mobile, and desktop
IDE = Integrated Development Environment VS 2017 is state of the art First version in 1997: multibillion $ investment Free to you: look for “more options” “MS imagine premium” get VS 2015 with update 3. Visual Studio Excel

4 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 : in-windows-10

5 How VS works Coding Compiling
Requirements: What we want the computer to do Visual Studio Coding Compiling Source code file in a computer language Runnable program .exe, .dll C#, VB, C++

6 Source Code in VB

7 VBA editor vs. VS with VSTO
VBA Editor is included in Excel Older technology Huge installed base Supported but not improved upon Has a recorder All saved within workbook Visual Studio tools for Office is included in VS Newer, way more powerful technology Growing installed base Fully supported and updated No recorder Saved in several files

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

9 Control Structures Loops for Repetitive Tasks

10 Loops – For … Next For i As Integer = 1 To 10 Step 1 next
Range(“A2”).Offset(i, 0).Value = i * 100 next

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

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

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

14 WINIT What Is New In Technology?

15 Object-Oriented (OO) VB and VBA are OO languages
Almost everything is an object Object = methods() + properties Properties have values. A value can be another object Class is a description (code) for an object Instance is a specific working object in your computer

16 Dot notation The dot allows us to “look inside” items.
Go from “known” to “specific”. Range(“A3:B8”).Borders.Color = Drawing.Color.LightGray Range(“A3:B8”).Interior.Color = Drawing.Color.DarkBlue

17 H4

18 Trouble? Submit carefully Come and see me. Office hours on web site.


Download ppt "Control Structures (part II)"

Similar presentations


Ads by Google