32
Okno_Dialogowe.Show If Praca w_petli = False Th en Exil Sub Endlf Loop End Sub
>*****#************«**************$**$****************************«****#** Sub Zapiszf)
Dane(l) = Okno_DiaIogowe.TexlBoxl.Text Dane(2) = Okno_Dialogowe. TextBox2. Text Dane(3) = Okno_Dialogowe.TextBox3.Text Dane(4) = Okno_Dialogowe.TextBox4.Text Dane(5) = Okno_Dialogowe.TextBox5.Text Dim Przesuniecie As Object
Set Przesuniecie = Worksheets("Tabelka").Cells(l, lj.CurrentRegion NewRow - Przesuniecie.Rows.Count + 1 IfDane(l) <> ""Then
Worksheets("Tabelka").Cells(NewRow, 1) = NewRow-1 Elsę
styl = 16
kom = "Brak danych do zapisania!!!"
MsgBox (kom)
Endlf
For i = 1 To 5 With Worksheets("Tabelka")
Cells(NewRow, i + 1). Value = Dane(i)
End With Next Wyczysc End Sub
Sub Zamknij_dialog() Okno _Dialogowe. Hide Praca_w_petli = False End Sub
Sub Ustaw_menu()
Before:=l,
Before:=l,
MenuBars(xlWorksheet).Menus.Add Caption:="&Mala baza", Before:=2
MenuBars(xlWorksheet).Menus("&Mala baza").Menultems.Add Caption:="&Wpisz dane",
OnAction:="Start"
MenuBars(xlWorksheet).Menus("&Mala baza").Menultems.Add Caption: = "&Koniec pracy", OnAction:="Koniec "
End Sub
Sub Usun_menu()
For Each MenuName In MenuBars(xlWorksheet).Menus If MenuName.Caption = "&Mala baza" Then MenuName.Delete Endlf Next End Sub