.


:




:

































 

 

 

 


Dim inf(1 To 10) As Abonent




Dim i, n As Integer

Dim n1 As String

n = Val(InputBox(" "))

For i = 1 To n Step 1

With inf(i)

.fam = InputBox(" ")

.name = InputBox(" ")

.namber = Val(InputBox(" "))

.adr = InputBox(" ")

End With

Next i

n1 = InputBox(" ")

For i = 1 To n Step 1

If n1 = inf(i).fam Then

MsgBox inf(i).fam & Chr(13) & _

inf(i).name & Chr(13) & _

inf(i).namber & Chr(13) & _

Inf(i).adr

End If

Next i

End Sub


 


23 Visual Basic for Application Microsoft Office Excel.

VBA, .

Application ( "") Excel . , , , . , Excel.

Windows ( "") , . ActiveWindow .

Workbooks ( " ") , : ; . ActiveWorkbook , .

Worksheets ( " ") , , . ActiveWorksheet - , .

Range ( "") , , , , , . Excel . ActiveCell - . , , Cell Range.

, , . , 1 Excel, VBA:

Application.Workbooks(1).Worksheets(1).Range("A1").Value = 1

, , (Collections) Workbooks Worksheets ( , , ). .

Sub pr()

Dim s, s1, s2, s3, s4, s5, s6, s7, s8 As String

s = InputBox(" ")

s1 = Right(s, 8)

s2 = Left(s, 7)

s3 = Mid(s, 10, 1)

s4 = s2 & s3

s5 = Mid(s, 4, 1)

s6 = Mid(s, 6, 2)

s7 = Mid(s, 10, 2)

s8 = s5 & s6 & s7

MsgBox s1 & Chr(13) & _

s4 & Chr(13) & _

S8

End Sub


 


24 Visual Basic for Application Microsoft Office Excel.

VBA, , (Properties), . . , Value Range B3 Sales Current.xls: Workbooks("current.xls").Worksheet("sales").Range("B3").Value=3

Bold Font B3 Sales : Workbooks("current.xls").Worksheet("sales").Range("B3").Font.Bold =true

Excel Range ( ) , :

1.Font ;

2.Formula ;

3.Value ;

, .

, . , , : .

, : ActiveCell.Value

, . , , Application ActiveWindow, , . ActiveWindow, , Windows, ActiveCell, Range. , ActiveCell Font, , , Name,

Size Bold. , -, "" . : ActiveWindow.ActiveCell.Font.Size

, , With . Excel

Application

1.ActiveWindow

2.ActiveWorkbook

3.ScreenUpdating ( , )

4.StandardFont





:


: 2016-12-06; !; : 441 |


:

:

, ,
==> ...

1447 - | 1410 -


© 2015-2024 lektsii.org - -

: 0.01 .