Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Used to be possible in Excel97

Hi.
Is there any way of renaming files through VBA with Excel XP?
I remember it used to be possible with previous versions.
Best regards,
Albert C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Used to be possible in Excel97

Albert,
Name "OldFile" As "NewFile"

NickHK

"Albert" wrote in message
...
Hi.
Is there any way of renaming files through VBA with Excel XP?
I remember it used to be possible with previous versions.
Best regards,
Albert C



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Used to be possible in Excel97

I don't get it.

"NickHK" wrote:

Albert,
Name "OldFile" As "NewFile"

NickHK

"Albert" wrote in message
...
Hi.
Is there any way of renaming files through VBA with Excel XP?
I remember it used to be possible with previous versions.
Best regards,
Albert C




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Used to be possible in Excel97

The command looks like this:

Name strOldFilename As strNewFilename

where strOldFilename and strNewFilename are string variables containing the
old and new filenames. Or just use the text:

Name "c:\temp\oldname.xls" As "c:\temp\newname.xls"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Albert" wrote in message
...
I don't get it.

"NickHK" wrote:

Albert,
Name "OldFile" As "NewFile"

NickHK

"Albert" wrote in message
...
Hi.
Is there any way of renaming files through VBA with Excel XP?
I remember it used to be possible with previous versions.
Best regards,
Albert C






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Used to be possible in Excel97

That's the code to use . Check the help for the Name statement.
Name "C:\Oldfile.txt" As "C:\NewFile.txt"

NickHK

"Albert" wrote in message
...
I don't get it.

"NickHK" wrote:

Albert,
Name "OldFile" As "NewFile"

NickHK

"Albert" wrote in message
...
Hi.
Is there any way of renaming files through VBA with Excel XP?
I remember it used to be possible with previous versions.
Best regards,
Albert C








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Used to be possible in Excel97

Got it, did it.
Thanks.

"Jon Peltier" wrote:

The command looks like this:

Name strOldFilename As strNewFilename

where strOldFilename and strNewFilename are string variables containing the
old and new filenames. Or just use the text:

Name "c:\temp\oldname.xls" As "c:\temp\newname.xls"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Albert" wrote in message
...
I don't get it.

"NickHK" wrote:

Albert,
Name "OldFile" As "NewFile"

NickHK

"Albert" wrote in message
...
Hi.
Is there any way of renaming files through VBA with Excel XP?
I remember it used to be possible with previous versions.
Best regards,
Albert C






Reply
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
Excel97 not quit biu Excel Programming 2 May 23rd 04 05:26 PM
Excel97 vs Excel2000 bob engler Excel Programming 0 April 1st 04 05:01 AM
Using Outlook98 with Excel97 Keith[_7_] Excel Programming 3 November 12th 03 04:39 PM
Help with Excel97 formatting Tom Ogilvy Excel Programming 0 September 13th 03 05:02 PM
Help with Excel97 formatting Dave Peterson[_3_] Excel Programming 0 September 13th 03 02:57 PM


All times are GMT +1. The time now is 01:42 AM.

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

About Us

"It's about Microsoft Excel"