Hi All,
Does anyone know why I'm getting a 'Null Reference' error when I try to use a FolderBrowser?
I have the following code (called from a Toolstrip Menu Item):
<code>
Dim fldBrowser As FolderBrowserDialog = New FolderBrowserDialog
fldBrowser.RootFolder = Environment.SpecialFolder.DesktopDirectory
fldBrowser.Description = "Which Folder do you want to use as a Destination?"
If fldBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
strSelection = fldBrowser.SelectedPath
End If
fldBrowser = Nothing
</code>
This works perfectly well in one project, but not my new one :(
The 'Help' suggests using the "New" keyword, so which part of '= New FolderBrowserDialog' doesn't it understand?
Please save my computer from an untimely demise...
Thanks for looking,
Chris.