LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to save file as different filename mac Excel Worksheet Functions 6 November 21st 07 10:43 PM
Auto save file copy with unique filename Allen Excel Worksheet Functions 1 June 27th 06 08:18 PM
Filename has Url in file-save dialog when saving exported Excel do GJones Excel Programming 0 September 1st 04 08:17 PM
Save file, refer filename to cell and change directory Metin[_3_] Excel Programming 3 April 23rd 04 02:13 AM
Save excel file with filename = cell text TroyB[_2_] Excel Programming 1 November 26th 03 01:00 AM


All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"