Save filename as new file name
On the first page of my excel workbook I have the A column stretched out to a
column width of 54. To the right side of this sheet I have a button called
"Find Record" that populates column A with all records contained in the excel
folder on drive F. What my boss wants (and what I'm attempting to do) is to
be able to select a file from the list in column A. Then by clicking on the
"Rename" button he could enter in a new name for the file, and have the file
name changed to the new name he inputs. I have part of the code worked out,
but I am having alot of trouble getting the new name to replace the old name.
Here is the code:
Private Sub cmdRename_Click()
Dim sFileName As String, sPath As String, rFileName As String
sFileName = ActiveCell.Select
sPath = "F:\excel\"
rFileName = InputBox("")
End Sub
Any help or advice would be greatly appreciated.
c_ascheman
|