R
RobcPettit
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
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