Function Bekap() Dim StaroIme As String Dim NovoIme As String Dim Ime As String Dim Putanja As String On Error GoTo Kraj StaroIme = ImeBaze Putanja = PutanjaB NovoIme = Year(Date) & Format(Month(Date), "mm") & Format(Day(Date), "dd") NovoIme = Putanja & "backup\" & NovoIme & ".zip" Shell Putanja & "Pkzip " & NovoIme & " " & StaroIme MsgBox "Rezervna kopija baze zapisana na putanji." & vbCr & NovoIme Exit Function Kraj: GreskaB (Err.Number) End Function Function ImeBaze() Dim Ime As String Ime = CurrentDb.Name Do Until Right$(Ime, 1) = "." Ime = Left$(Ime, Len(Ime) - 1) Loop Ime = Left$(Ime, Len(Ime) - 1) ImeBaze = Ime & "_be.mdb" End Function Function PutanjaB() Dim Putanja As String Putanja = CurrentDb.Name Do Until Right$(Putanja, 1) = "\" Putanja = Left$(Putanja, Len(Putanja) - 1) Loop PutanjaB = Putanja End Function