Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename .txt file with macro
Sorry about this rather simple question everyone but I have only jus stated working with Excel!! I need to rename an existing .txt file to a .xml file. The file wil always be in the same directory on the pc, is this possible with cod in a macro? -- markjhunte ----------------------------------------------------------------------- markjhunter's Profile: http://www.excelforum.com/member.php...fo&userid=1598 View this thread: http://www.excelforum.com/showthread.php?threadid=27456 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename .txt file with macro
IF you want something simple try the shell command and then "rename
c:\filename.txt c:\filename.xml" "markjhunter" wrote in message ... Sorry about this rather simple question everyone but I have only just stated working with Excel!! I need to rename an existing .txt file to a .xml file. The file will always be in the same directory on the pc, is this possible with code in a macro?? -- markjhunter ------------------------------------------------------------------------ markjhunter's Profile: http://www.excelforum.com/member.php...o&userid=15988 View this thread: http://www.excelforum.com/showthread...hreadid=274563 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename .txt file with macro
The following code allows you to change a filename, make sure and adjus the directory location / filename before running. OldName = "C:\test.txt": NewName = "C:\test.xml" Name OldName As NewNam -- crispb ----------------------------------------------------------------------- crispbd's Profile: http://www.excelforum.com/member.php...fo&userid=1088 View this thread: http://www.excelforum.com/showthread.php?threadid=27456 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename .txt file with macro
Hi Markjhunter,
I need to rename an existing .txt file to a .xml file. The file will always be in the same directory on the pc, is this possible with code in a macro?? Sure, it's the Name command: Name OldFile, NewFile Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rename Worksheet Tab as File Name Using a Macro | Excel Discussion (Misc queries) | |||
FILE AUTO-RENAME | Excel Discussion (Misc queries) | |||
How to set SAVE AS file name to equal A1 contents when rename file | Excel Discussion (Misc queries) | |||
Rename file | Excel Programming | |||
rename file macro | Excel Programming |