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: 80
Default editing filename

Hi, I have a folder of .prn files which with vba I use,
Sub GetFileNames()
Dim Fname As String
Dim Ftype As String

Ftype = Dir("H:\Sharescope excel update\*.prn")
i = 0
Fname = Ftype
Do Until Fname = ""
i = i + 1
ReDim Preserve Fnames(1 To i)
Fnames(i) = Fname
Fname = Dir
Loop
End Sub
To get the list. When I open the file it opens as aaa.prn,
understandably. I then save this file as a xl workbook using,
ChDir "H:\Trimmed DaTa"
ActiveWorkbook.SaveAs Filename:="H:\Trimmed DaTa\" & Fnames(c) &
"xls ", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
This is not a problem in as much as I can do what I need with the file.
But it saves it as aaa.prnxls. Is there a way of trimming the .prn off
before saving.
Regards Robert

 
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
"filename is locked for editing by username" srinath Excel Discussion (Misc queries) 1 February 26th 09 11:35 AM
Excel 2007: Filename.xls is locked for editing by another user TERRAUSC Excel Discussion (Misc queries) 1 December 10th 08 03:19 PM
set filename to <filename-date on open bob engler Excel Worksheet Functions 2 July 13th 06 05:11 AM
Filename is locked for editing in Excel 2002 SP3 Lloyd Excel Discussion (Misc queries) 1 December 6th 05 06:31 PM
Saving filename same as import filename Matt Excel Programming 4 February 24th 04 03:01 PM


All times are GMT +1. The time now is 11:18 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"