justify"> 2.4 Текст програми
flag As Booleanflag9 As Booleanfl As BooleanoExcel As New Excel.ApplicationoWbk As Excel.Workbookosheet As Excel.Worksheetcn As ADODB.ConnectionSub CommandButton1_Click () = True.ShowSub
Sub CommandButton2_Click () = False.ShowSub
Sub CommandButton3_Click (). SaveMsgBox ("Ви дійсно хочете вийти з програми?", vbYesNo + vbQuestion) = vbYes Then.Hide.QuitIfSub
Sub CommandButton4_Click () = True.ShowSub
Sub CommandButton5_Click (). ShowSub
Sub CommandButton6_Click (). ShowSub
Sub CommandButton7_Click () Error GoTo erqoWbk = Workbooks.Open ("C: подпіска1.xls") osheet = oWbk.Worksheets.Item ("підписка"). DisplayAlerts = False.PrintOut. QuitSub: "Помилка! Не знайдене шаблон підписки. Перегляд і друк неможливі. "p align="justify"> CommandButton14.Enabled = False.QuitSub
Sub UserForm_Initialize () = True.Caption = "Головне меню" Error GoTo oshibka: cn = New ADODB.Connection.Provider = "Microsoft.Jet.OLEDB.4.0". ConnectionString = " ; C: База_для_практікі.mdb ". Open
Not cn Is Nothing Thencn.State = adStateOpen Then "База даних успішно приєднана. Ласкаво просимо в програму. Вдалої роботи. Проверерьте, чи всі бібліотеки підключені) "= True:" Помилка! База даних не знайдена! "p align="justify"> fl = False
End IfIf
fl = False Then.Enabled = False.Enabled = False.Enabled = False.Enabled = True.Enabled = True.Enabled = TrueIf
Sub
Sub userform_Activate () = False = FalseSub
cn As ADODB.Connectionbm As VariantisDisable As Booleanskiprecord As Longdirection As Longrs1 As New ADODB.Recordsetrs2 As New ADODB.Recordsetrs3 As New ADODB.Recordsetrs4 As New ADODB.Recordsetbmark As Variantcriteria As Stringflag5 As Booleanflag4 As Booleanflas As Boolean
Sub ComboBox1_KeyDown (ByVal keyCode As MSForms.ReturnInteger, ByVal shift As Integer) = 0Sub
Sub ComboBox1_KeyPress (ByVal KeyAscii As MSForms.ReturnInteger) = 0Sub
Sub CommandButton1_Click (). ShowSub
Sub CommandButton10_Click () _izmNot rs1.EOF Then.MoveNextNot rs1.EOF Then.MoveLastIfIfSub
Sub CommandButton11_Click () rs1.RecordCount> = 1 ThenMsgBox ("Видалити поточний запис?", vbYesNo + vbQuestion) = vbYes Then.Deleters1.RecordCount> 0 Then_ClickIfIfIfSub
Sub Save_izm () Error GoTo errork: rs3.Fields ("Код_паспорта_тр_ср"). Value <> TextBox8.Value Or _.Fields ("Серія"). Value <> TextBox9.Value Or rs3.Fields ("Номер"). Value <> TextBox10.Value _rs3.Fields ("Головпоштамт"). Value <> TextBox11.Value Thenrs4.Fields ("Код_техпаспорта"). Value <> TextBox12.Value _rs4.Fields ("Серія"). Valu...