Hi all,
I read up about this somewhere I have a very tiny basic program using the commondialog control. It is bieng called from a shortcut. How can I make it so it automatically closes when its finished. i.e. so the form closes when finished rather than the user having to close it.
VB Code:
Private Sub Form_Load() Dim strFile As String On Error Resume Next With CommonDialog1 .Flags = cdlOFNExplorer .Filter = "Jpg (*.jpg)|*.jpg" .InitDir = "C:\" .DialogTitle = "Select File" .ShowOpen If Not .FileName = "" Then strFile = Mid(.FileName, InStrRev(.FileName, "\") + 1) If Dir(FAVORITES_FOLDER & strFile) = "" Then FileCopy .FileName, FAVORITES_FOLDER & strFile End If End If End With End Sub
thanks in advance
Rob


Reply With Quote
