Avatar of Murray Brown
Murray Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

VB.net OpenFileDialog - get folder name

Hi
How do you use the OpenFileDialog to get the folder name.
I am using the following code to get the file name and need to modify it to        
get the folder name

 Try

            With OpenFileDialog1
                .FileName = GetMyDocumentsFolder()  'takes to My Documents folder
                .ShowDialog()
                Me.txtSaveAttachmentToFolder.Text = .FileName
            End With

            Me.TopMost = True

        Catch
            MsgBox("There was a problem opening the file you specified!")
        End Try
.NET Programming

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
udk1

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Murray Brown

ASKER
thanks very much
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes