овчитель VBA", Технологія створення користувацьких додатків, С. - П. BHV, 1999.
2. В.Г. Кузьменко "VBA 2000" (самовчитель) М., ЗАТ "Видавництво Біном", 2000.
Додаток
Код програми:
// Workbook (Main.xls). Worksheets (1)
Private Sub Worksheet_SelectionChange (ByVal Target As Range)
Main.ShowSub
// Workbook (Main.xls). Worksheets (СпісокФірм) Sub Worksheet_Activate ()
'Експорт
maxi = 5
i = 4
Do
If i = 4 And Cells (i, 1). Value = "" Then Exit Do
i = i + 1
Loop While Cells (i, 1). Value <> ""
Range (Cells (4, 1), Cells (i, 5)). Delete
Range ("A3"). Name = "Наїм"
a = Range ("Наїм"). Row + 1
n = 0
For Each Sheet In Workbooks ("Firms"). Worksheets
If Sheet.Name <> "1" Then
For j = 1 To 5
If j = 5 Then
Workbooks ("Main"). Worksheets ("СпісокФірм"). Cells (a, j). Hyperlinks.Add _
Anchor: = Workbooks ("Main"). Worksheets ("СпісокФірм"). Cells (a, j), _
Address: = "<" & Sheet.Cells (1, j)
Exit For
End If
Workbooks ("Main"). Worksheets ("СпісокФірм"). Cells (a, j) = _
Sheet.Cells (1, j)
Stri = CStr (Sheet.Name)
If j = 1 Then
ActiveSheet.Hyperlinks.Add Anchor: = Workbooks ("Main"). Worksheets ("СпісокФірм"). Cells (a, j), _
Address: = "C: Users Marinkoff Desktop Firms.xls", SubAddress: = _
"'" & Stri & "'! A1", TextToDisplay: = CStr (Sheet.Cells (1, j). Value)
End If
Next j
Оформити a, maxi
a = a + 1
n = n + 1
End If
Next Sheet
Label1.Caption = Chr (13) & "У базі даних" & n & "турфірм" & Chr (13)
Columns ("A: E"). Select
Selection.RowHeight = 30
Selection.ColumnWidth = 24
If ActiveSheet.AutoFilterMode = False Then
Range ("A3: E3"). Select
Selection.AutoFilter
End If
Range ("A1"). SelectSub
// Workbook (Main.xls). Worksheets (ПоіскПутевкі)
Private Sub CommandButton1_Click ()
i = 4
Do
If i = 4 And Cells (i, 1). Value = "" Then Exit Do
i = i + 1
Loop While Cells (i, 1). Value <> ""
Range (Cells (4, 1), Cells (i, 12)). DeleteSubSub CommandButton2_Click ()
i = 4
Do
If i = 4 And Cells (i, 1). Value = "" Then Exit Do
i = i + 1
Loop While Cells (i, 1). Value <> ""
Range (Cells (4, 1), Cells (i, 12)). Delete
Find.ShowSubSub CommandButton3_Click ()
Workbooks ("Main.xls"). Worksheets ("1"). Activate
Main.ShowSub
// Workbook (Main.xls). Worksheets (Замовлення)
Private Sub CommandButton1_Click ()
Main.ShowSubSub Workshee...