VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Begin VB.Form frmInput BorderStyle = 1 'Fixed Single Caption = "Selectie inputbestand" ClientHeight = 6855 ClientLeft = 45 ClientTop = 435 ClientWidth = 18990 Icon = "frmInput.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False ScaleHeight = 6855 ScaleWidth = 18990 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton cmdOpenProfiellijnenbestand Caption = "Command1" Height = 495 Left = 8040 TabIndex = 1 Top = 1440 Width = 735 End Begin MSComDlg.CommonDialog openBestand Left = 8160 Top = 360 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin VB.CommandButton cmdOK Caption = "OK >>" Height = 495 Left = 6480 TabIndex = 0 ToolTipText = "Klik op OK om verder te gaan" Top = 6240 Width = 1335 End End Attribute VB_Name = "frmInput" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Function openBestanden(ByVal titleOpenDialog As String) As String 'Sets the Dialog Title to Open File openBestand.DialogTitle = titleOpenDialog 'Definieer setting file dialog venster 'Sets the File List box to csv files openBestand.Filter = "DAM Edit Input files (*.txt)|*.txt" 'Set the default files type to csv files openBestand.FilterIndex = 1 'Sets the flags - File must exist and Hide Read only openBestand.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly 'Set dialog box so an error occurs if the dialogbox is cancelled openBestand.CancelError = True ' Enables error handling to catch cancel error On Error Resume Next ' display the dialog box openBestand.ShowOpen If Err Then ' This code runs if the dialog was cancelled MsgBox "Geen bestandsnaam geselecteerd" Exit Function End If 'Bewaar de bestandsnaam in de functie variabele openBestanden = openBestand.FileName End Function Private Sub cmdOk_Click() 'Declareer tijdelijkervariable Dim temp, i As Integer 'Controleer eerst of er een bestand is gekozen If inputBestand = "" Then temp = MsgBox("Selecteer eerst een invoerbestand alvorens verder te gaan", vbInformation, "Let op!") Exit Sub End If 'Controleer of er een kadenaam is opgegeven 'Unload het formulier frmInput Unload frmInput 'Laad het formulier frmLaden en frmGraphicView frmLaden.Show frmLaden.Refresh frmGraphicView.Show End Sub Private Sub cmdOpenProfiellijnenbestand_Click() 'Declareer lokale variabelen Dim titleMenu As String 'Sets the Dialog Title to Open File titleMenu = "Open DAM Edit profiellijnenbestand" 'Selecteer bronbestand txtProfielbestand.Text = openBestanden(titleMenu) End Sub