'

 

' -

Private Sub Command1_Click()

On Error GoTo dolu '

FileCopy IzbranFile, ImeZaZapis '

Exit Sub '

'

dolu: MsgBox " !", vbInformation, " "

End Sub

 

' -

Private Sub Command2_Click()

On Error GoTo dolu '

Kill IzbranFileZaDel '

'

MsgBox " ", vbInformation, " "

Exit Sub '

'

dolu: MsgBox " ", vbCritical, " "

End Sub

' Izbor

Public KratkoIme

 

'

Public Function IzbranFile()

KratkoIme = ""

Set objDialog = CreateObject("MSComDlg.CommonDialog")

objDialog.dialogTitle = " , "

objDialog.ShowOpen

If Len(objDialog.FileName) > 1 Then

IzbranFile = objDialog.FileName

Cherta = InStr(StrReverse(IzbranFile), "\") - 1

KratkoIme = Right(IzbranFile, Cherta)

End If

End Function

 

'

Public Function ImeZaZapis()

If KratkoIme = "" Then GoTo dolu

Set IzborZaZapis = CreateObject("MSComDlg.CommonDialog")

IzborZaZapis.dialogTitle = " "

IzborZaZapis.FileName = KratkoIme

IzborZaZapis.ShowSave

ImeZaZapis = IzborZaZapis.FileName

dolu:

End Function

 

'

Public Function IzbranFileZaDel()

 

Set objDialog = CreateObject("MSComDlg.CommonDialog")

objDialog.dialogTitle = " , "

objDialog.ShowOpen

If Len(objDialog.FileName) > 1 Then

IzbranFileZaDel = objDialog.FileName

End If

End Function