, :

() .

Run / Run Sub- ;

Run / Break- ;

Run / Reset- ;

Debug / Step Into- ;

Debug / Step Over- ;

Debug / Toggle BreakPoint- ;

Debug / Clear All BreakPoints- .


1

. . 0

1.

SubUsingVariable ()

DimNum1As Integer

Num1= Worksheets (1) .Range ( "A1"). Value

MsgBoxNum1

End Sub

2.

PublicNum1 As Integer

'

'****************************

SubUsingVariable ()

Num1 = Worksheets (1) .Range ( "A1"). Value

MsgBox Num1

End Sub

'****************************

3.

'****************************

SubUsingConst ()

ConstNum1 As String= "Tomsk Polytechnic Univ."

MsgBox Num1

End Sub

'****************************

4.

ConstNum1 As String= "Tomsk Polytechnic Univ."

'****************************

SubUsingConst ()

MsgBox Num1

End Sub

'****************************

5.

Public ConstNum1 As String= "Tomsk Polytechnic Univ."

'****************************

SubUsingConst ()

MsgBox Num1

End Sub

'****************************

6.

SubCall_Function ()

Dimvar1As Integer

Dimvar2 As Integer

Dimvar3 As Integer

var1 = 5

var2 = 10

var3 = Multiply (var1, var2)

MsgBox (var3)

End Sub

___

FunctionMultiply (ByValvar1 As Integer, ByValvar2 As Integer)

Multiply = var1 * var2

End Function

7.

SubProc ()

var1 = GetRand

ModuleLevelProcedure var1



End Sub | End Function
© um.co.ua -