Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
change type of a file
I need code which take file from type file and change the type to be excel file
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
change type of a file
I'm not at all sure what you mean, but you can change the name of
a file with code like Name "H:\test2" As "H:\test2.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "????" wrote in message ... I need code which take file from type file and change the type to be excel file |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
change type of a file
It's answer the quaton that I asked, but I need same thing a little bet maor
compicated. I can use the file name becuse there is a loop that opens all the files in the same folder. Here is the code the line that shifting right is problematic(it got an erro mesage object doesn't supporat this property or methode ). I will be happy if same one would be able to deal with it thanks Dim oFSO Sub LoopFolders() Dim i As Integer Set oFSO = CreateObject("Scripting.FileSystemObject") selectFiles "c:\MyTest" Set oFSO = Nothing End Sub '--------------------------------------------------------------------------- Sub selectFiles(sPath) '--------------------------------------------------------------------------- Dim Folder As Object Dim Files As Object Dim file As Object Dim fldr Set Folder = oFSO.GetFolder(sPath) For Each fldr In Folder.Subfolders selectFiles fldr.Path Next fldr For Each file In Folder.Files Workbooks.Open Filename:=file.Path Name ActiveWorkbook As file.Path.xls ActiveWorkbook.Save ActiveWorkbook.Close Next file End Sub "Chip Pearson" wrote: I'm not at all sure what you mean, but you can change the name of a file with code like Name "H:\test2" As "H:\test2.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "????" wrote in message ... I need code which take file from type file and change the type to be excel file |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change type of a file | Excel Programming | |||
how to change all the words of one type(Gunsuh type)to another | Excel Discussion (Misc queries) | |||
How do I change file/open/"files of type" to default to "all file. | Excel Discussion (Misc queries) | |||
how a file can change its type from '.xls' to '.tmp' | Excel Discussion (Misc queries) | |||
Export an excel file as text without change of document type | Excel Programming |