Imports System Imports System.IO Imports System.Data.OleDb Imports System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock Imports System.Collections Public Class Form1 Dim dateiauswahl As String Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Location = New Point(0, 0) curdir = My.Application.Info.DirectoryPath wahl = 0 End Sub Private Sub option1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles option1.CheckedChanged If option1.Checked = False Then Exit Sub End If FolderBrowserDialog1.SelectedPath = "C:\" ofd() wahl = 1 End Sub Private Sub option2_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles option2.CheckedChanged If option2.Checked = False Then Exit Sub End If FolderBrowserDialog1.SelectedPath = "C:\programme\" ofd() wahl = 2 End Sub Private Sub ofd() Dim ofd As New OpenFileDialog FolderBrowserDialog1.ShowDialog() Text13.Text = FolderBrowserDialog1.SelectedPath End Sub Private Sub option3_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles option3.CheckedChanged If option3.Checked = False Then Exit Sub End If Using obj As New OpenFileDialog obj.Filter = "foldersOnly|*.none" obj.CheckFileExists = False obj.CheckPathExists = False obj.InitialDirectory = "C:\windows\" obj.CustomPlaces.Add("H:\OIS") ' add your custom location, appears upper left obj.CustomPlaces.Add("H:\Permits") ' add your custom location obj.Title = "Select folder - click Open to return opened folder name" obj.FileName = "OpenFldrPath" If obj.ShowDialog = Windows.Forms.DialogResult.OK Then Text13.Text = (IO.Directory.GetParent(obj.FileName).FullName) End If End Using wahl = 3 End Sub Private Sub CodeErscheinung_Click(sender As System.Object, e As System.EventArgs) Handles CodeErscheinung.Click Form2.Show() End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click End End Sub End Class