Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Remove extension

Hello,

First of all - sorry for my bad english!

I have written a macro in Excel that does the following things:
* the data on the sheet is copied to another workbook and this workbook
is saved as a *.prn file
* then the new workbook will be closed

Is it possible to remove the prn-extention after I have saved and closed
it?



Stanley

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Remove extension

Hi Stanley,

Why do you want to do this? Are you referring to the file on the disk, and
do you want to change the file type?

--
HTH

Bob Phillips

"Stanley Lam" wrote in message
...
Hello,

First of all - sorry for my bad english!

I have written a macro in Excel that does the following things:
* the data on the sheet is copied to another workbook and this workbook
is saved as a *.prn file
* then the new workbook will be closed

Is it possible to remove the prn-extention after I have saved and closed
it?



Stanley

*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Remove extension

Bob,

Thanks for your reaction!

The file that has been made, I have to upload it to another application.
But in order to make this work, there are 2 things that has to been done
before uploading it:
1. the file has to be saved as a *.prn
2. the extension has to be removed

So the type of file is created by my macro (*.prn), but the final step
removing the extension still has to be made.



Stanley


*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Remove extension

Hi Stanley,

This should get you started

Dim sFile As String

sFile = "C:\myTest\Test.prn"
Name sFile As Replace(sFile, ".prn", "")


--
HTH

Bob Phillips

"Stanley Lam" wrote in message
...
Bob,

Thanks for your reaction!

The file that has been made, I have to upload it to another application.
But in order to make this work, there are 2 things that has to been done
before uploading it:
1. the file has to be saved as a *.prn
2. the extension has to be removed

So the type of file is created by my macro (*.prn), but the final step
removing the extension still has to be made.



Stanley


*** Sent via Developersdex http://www.developersdex.com ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove extension

If it is created by your macro, why not assign it a name with the extension
you want and just avoid the need to rename it.

--
Regards,
Tom Ogilvy

"Stanley Lam" wrote in message
...
Bob,

Thanks for your reaction!

The file that has been made, I have to upload it to another application.
But in order to make this work, there are 2 things that has to been done
before uploading it:
1. the file has to be saved as a *.prn
2. the extension has to be removed

So the type of file is created by my macro (*.prn), but the final step
removing the extension still has to be made.



Stanley


*** Sent via Developersdex http://www.developersdex.com ***





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Remove extension

Bob,

you're my hero! With that code I can remove the extension.


Many thanks,
Stanley



*** Sent via Developersdex http://www.developersdex.com ***
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
file with udf extension Ruth Excel Discussion (Misc queries) 2 June 3rd 10 08:54 PM
.xls Extension Felix Excel Discussion (Misc queries) 2 July 9th 08 09:34 PM
Transformation d'images avec une extension .jpg ou .jpeg en images avec extension .bmp ou .ico imej-clavier Excel Discussion (Misc queries) 1 May 28th 05 05:52 PM
.xlb extension Tanya T. Excel Discussion (Misc queries) 5 April 28th 05 12:12 AM
xls extension winjon Excel Discussion (Misc queries) 1 March 3rd 05 11:20 AM


All times are GMT +1. The time now is 03:40 PM.

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"