AddFile  With CD1     .InitDir = App.Path     .FileName = "" 'Clear the filename     .CancelError = True 'Gives an error if cancel is pressed     .DialogTitle = "Add File"     .Filter = "All Files (*.*)|*.*"     On Error Resume Next     .Action = 1   End With   If Err <> 0 Then Exit Sub   myfile$ = CD1.FileName   xlen = FileLen(myfile$) 'can we store the datas in the current picture?   If JRStegano1.CanAddData(xlen) = False Then     'Autoresize activ?     If Check3.Value = 1 Then     'get the picture size to store the data     JRStegano1.CalculateNewSize xlen, Mynewwidth, Mynewheight     'adjust the picture to the new size     If JRStegano1.ResizePicture(Mynewwidth, Mynewheight, True) = False Then       MsgBox "The picture cant be resized", vbOKOnly, "Datas not stored"       Exit Function     End If     Else       MsgBox "Datas to long for current picture"       Exit Function     End If   End If     'Store the datas to the picture   JRStegano1.AddFile myfile$ |