Hi, I'm using this to retrieve a file name from a path:

Code:
Dim fullPath As String = TextBox1.Text
Dim fileName As String = IO.Path.GetFileName(fullPath)
However, when I put it to use using something like this:

Code:
IO.File.Copy(TextBox1.Text, ListBox1.SelectedItem.ToString + "PSP\THEME\" + fileName)
I get the 'NullReferenceException' error Can somebody help me with this?

I'm sure it's just something I'm missing.