Hey people,
I wrote this code a while back to browse to a directory:
Sub BrowseToDir()
'Declare variables
Dim strOriginalPath As String
Dim x As Variant
Dim strSelectedPath As String
'Remember oroginal path
strOriginalPath = CurDir
'Show dialog and let user browse to a directory
x = Application.GetSaveAsFilename(InitialFileName:="_", Title:="Browse to desired directory and click Save")
'Get current directory, and show it
strSelectedPath = CurDir
Range("C2") = strSelectedPath
'Change back to original drive and path
On Error Resume Next
ChDrive strOriginalPath
ChDir strOriginalPath
MsgBox strOriginalPath
On Error GoTo 0
End Sub
Can anybody help me with instead of inputting the directory into cell 'C2' it puts the actual filename so for example scenario:
You browse for test.xls in C\:Desktop and this places "C\:Desktop\test.xls" in cell "c2" at the moment i can only display the path 
And also if there is a way that when when u click to open the browse, if you click cancel it leaves the cell intact, at the moment it always puts a directory and overwrites, cant work it out 
Thanks in advance!
Bookmarks