The following code creates folders named "Index" and inside index a folder named "A" and works ok
Dim Path As String = "C:\Users\Dave's\Documents\CardIndex"
My.Computer.FileSystem.CreateDirectory(Path)
Dim A As String = "\A"
SavePath = String.Concat(Path + A)
My.Computer.FileSystem.CreateDirectory(SavePath)
I then want to save text from richTextBox the following code
RichTextBox1.SelectAll()
RTBA = RichTextBox1.SelectedText
SavePath = "C:\Users\Dave's\Documents\CardIndex\A"
RichTextBox1.SaveFile(SavePath)
At this point I get this error
System.UnauthorizedAccessException was unhandled
Message="Access to the path 'C:\Users\Dave's\Documents\CardIndex\A' is denied."
What do I need to do to remedy this?
Dim Path As String = "C:\Users\Dave's\Documents\CardIndex"
My.Computer.FileSystem.CreateDirectory(Path)
Dim A As String = "\A"
SavePath = String.Concat(Path + A)
My.Computer.FileSystem.CreateDirectory(SavePath)
I then want to save text from richTextBox the following code
RichTextBox1.SelectAll()
RTBA = RichTextBox1.SelectedText
SavePath = "C:\Users\Dave's\Documents\CardIndex\A"
RichTextBox1.SaveFile(SavePath)
At this point I get this error
System.UnauthorizedAccessException was unhandled
Message="Access to the path 'C:\Users\Dave's\Documents\CardIndex\A' is denied."
What do I need to do to remedy this?