Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Files not opened
Hi,
It seems that after running the codes below in excel 2007, no files are detected and opened from "J" path. In fact there are 4 excel files in "J" folder that need to be opened Does the code below miss out anything ? Sub OpenFiles() Dim objFSO As Object Dim objFolder As Object Dim objFile As Object Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder("J:\BBC\LO\Budget\Acad") ' Change to suit For Each objFile In objFolder.Files If objFile.Type = "Microsoft Excel Worksheet" Then Workbooks.Open Filename:=objFolder.Path & "\" & objFile.Name 'Do things ActiveWorkbook.Close True 'or false End If Next End Sub Any help will be greatly appreciated Thanks & Regards Len |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
my excel files are being opened in Word and are unreadable Why? | New Users to Excel | |||
how to log all excel files opened on my pc? | Excel Programming | |||
can't close files opened in an excel application?? | Excel Programming | |||
Excel not showing last opened files | Excel Discussion (Misc queries) | |||
can cvs files be opened using excel viewer | Excel Discussion (Misc queries) |