Presentation is loading. Please wait.

Presentation is loading. Please wait.

Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.

Similar presentations


Presentation on theme: "Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double."— Presentation transcript:

1 Knowledge Base

2 Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double

3 Setting A Variable Assignment Statement Variable or Property = Expression Expression is evaluated Result is Assigned to the Variable

4 Example Label.Caption = Format(Val(Text.text),”currency”) Let Text.text contain “14.55”

5 Example Val(Text.text) is Val(“14.55”) Evaluates to the number 14.55 Format(14.55,”currency”) Evaluates to “$14.55” Assigned to Label.Caption Gives Label.Caption the contents “$14.55”

6 Getting User Input Text boxes Let the user type input data Val is used to convert to numbers Can be stored in Variables Can be stored in other objects properties

7 Displaying Output Label Box Captions Label.Caption = a string Label.Caption = Format(number, “type”)

8 Jumping to Modules Events

9 Testing Conditions If Then If condition Then code End If If condition Then code Else code End If

10 Conditions Comparisons of like types Equal = Less Than < Greater Than > Not Equal <>

11 Conditions Less Than or Equal <= Greater Than or Equal >=

12 Logical Operators Evaluate relationship between two Truth [Boolean] conditions And Or

13 And X And Y is 0 1 0 0 0 0 1 1 1 1 0 0

14 Or X Or Y is 0 1 1 0 0 0 1 1 1 1 0 1

15 Select Case Select Case expression Case value code Case value code Case Else code End Select

16 Option Buttons One and only Value is True per Container Container can be a –Form –Frame

17 Check Boxes One or more can have the Value Checked –0 unchecked –1 checked –2 grayed

18 MsgBox Function Resp = MsgBox(“prompt”, vbKeys, “Title”)


Download ppt "Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double."

Similar presentations


Ads by Google